Lines Matching defs:codes
22 The code lengths are lens[0..codes-1]. The result starts at *table,
33 unsigned codes, code FAR * FAR *table,
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 */
58 static const unsigned short lext[31] = { /* Length codes 257..285 extra */
61 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
65 static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
72 code lengths are lens[0..codes-1]. Each length corresponds to the
73 symbols 0..codes-1. The Huffman code is generated by first sorting the
75 for codes with equal lengths. Then the code starts with all zero bits
76 for the first code of the shortest length, and the codes are integer
80 decoding tables are built in the large loop below, the integer codes
88 The codes are sorted by computing a count of codes for each length,
95 the minimum and maximum length codes, determining if there are any
96 codes at all, checking for a valid set of lengths, and looking ahead
101 /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
104 for (sym = 0; sym < codes; sym++)
141 for (sym = 0; sym < codes; sym++)
148 bits off of the bottom. For codes where len is less than drop + curr,
160 counts are used for this, and so count[] is decremented as codes are
170 all codes of length max, i.e. all codes, have been processed. This
171 routine permits incomplete codes, so another loop after this one fills
208 /* process all codes and make table entries */