nl_tokens: / * @see http : // www . w3 . org / TR / PNG - Chunks . html
pl_tokens: function applyPngFilterMethod ( bytes , lineLength , colorsPerPixel , filter_method ) { var lines = bytes . length / lineLength , result = new Uint8Array ( bytes . length + lines ) , filter_methods = getFilterMethods ( ) , i = 0 , line , prevLine , offset ; for ( ; i < lines ; i ++ ) { offset = i * lineLength ; line = bytes . subarray ( offset , offset + lineLength ) ; if ( filter_method ) { result . set ( filter_method ( line , colorsPerPixel , prevLine ) , <mask> + i ) ; } else { var j = 0 , len = filter_methods . length , results = [ ] ; for ( ; j < len ; j ++ ) { results [ j ] = filter_methods [ j ] ( line , colorsPerPixel , prevLine ) ; } var ind = getIndexOfSmallestSum ( results . concat ( ) ) ; result . set ( results [ ind ] , offset + i ) ; } prevLine = line ; } return result ; }