Lines Matching refs:codes
22 The code lengths are lens[0..codes-1]. The result starts at *table,
32 int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
35 unsigned codes;
46 int left; /* number of prefix codes available */
58 unsigned short count[MAXBITS+1]; /* number of codes of each length */
60 static const unsigned short lbase[31] = { /* Length codes 257..285 base */
63 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
66 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
70 static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
77 code lengths are lens[0..codes-1]. Each length corresponds to the
78 symbols 0..codes-1. The Huffman code is generated by first sorting the
80 for codes with equal lengths. Then the code starts with all zero bits
81 for the first code of the shortest length, and the codes are integer
85 decoding tables are built in the large loop below, the integer codes
93 The codes are sorted by computing a count of codes for each length,
100 the minimum and maximum length codes, determining if there are any
101 codes at all, checking for a valid set of lengths, and looking ahead
106 /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
109 for (sym = 0; sym < codes; sym++)
146 for (sym = 0; sym < codes; sym++)
153 bits off of the bottom. For codes where len is less than drop + curr,
165 counts are used for this, and so count[] is decremented as codes are
175 all codes of length max, i.e. all codes, have been processed. This
176 routine permits incomplete codes, so another loop after this one fills
215 /* process all codes and make table entries */