Lines Matching defs:codes
22 The code lengths are lens[0..codes-1]. The result starts at *table,
32 int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes,
41 int left; /* number of prefix codes available */
53 unsigned short count[MAXBITS+1]; /* number of codes of each length */
55 static const unsigned short lbase[31] = { /* Length codes 257..285 base */
59 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
63 static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
67 static const unsigned short dext[32] = { /* Distance codes 0..31 extra */
74 code lengths are lens[0..codes-1]. Each length corresponds to the
75 symbols 0..codes-1. The Huffman code is generated by first sorting the
77 for codes with equal lengths. Then the code starts with all zero bits
78 for the first code of the shortest length, and the codes are integer
82 decoding tables are built in the large loop below, the integer codes
90 The codes are sorted by computing a count of codes for each length,
97 the minimum and maximum length codes, determining if there are any
98 codes at all, checking for a valid set of lengths, and looking ahead
103 /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
106 for (sym = 0; sym < codes; sym++)
114 if (max == 0) return -1; /* no codes! */
135 for (sym = 0; sym < codes; sym++)
142 bits off of the bottom. For codes where len is less than drop + curr,
154 counts are used for this, and so count[] is decremented as codes are
164 all codes of length max, i.e. all codes, have been processed. This
165 routine permits incomplete codes, so another loop after this one fills
204 /* process all codes and make table entries */
281 Fill in rest of table for incomplete codes. This loop is similar to the