int function ( JPEGImageInputStream arg0 ) { int loc0 = 0 ; short loc1 = ( short ) arg0 . readBits ( 1 ) ; while ( loc1 > maxcode [ loc0 ] ) { loc0 ++ ; loc1 <<= 1 ; loc1 |= arg0 . readBits ( 1 ) ; } int loc2 = huffval [ loc1 + ( valptr [ loc0 ] ) ] ; if ( loc2 < 0 ) loc2 = 256 + loc2 ; return loc2 ; }
generated from figure f. 16 - procedure for decode on iso dis 10918-1 . requirements and guidelines this function takes in a dynamic amount of bits and using the huffman table returns information on how many bits must be read in to a byte in order to reconstruct said byte . concode_field_sep short[] huffcode concode_elem_sep short[] valptr concode_elem_sep int HUFFMAN_MAX_TABLES concode_elem_sep short[] huffval concode_elem_sep short[] bits concode_elem_sep short[] mincode concode_elem_sep short[] EHUFSI concode_elem_sep byte JPEG_AC_TABLE concode_elem_sep short lastk concode_elem_sep short[] huffsize concode_elem_sep short[] EHUFCO concode_elem_sep short[] maxcode concode_elem_sep byte JPEG_DC_TABLE concode_field_sep void orderCodes concode_elem_sep int extend concode_elem_sep void generateSizeTable concode_elem_sep void generateDecoderTables concode_elem_sep void generateCodeTable