Lines Matching full:codes
13 The code lengths are lens[0..codes-1]. The result starts at *table,
16 to be generated, CODES, LENS, or DISTS. On return, zero is success,
23 int zlib_inflate_table(codetype type, unsigned short *lens, unsigned codes, in zlib_inflate_table() argument
32 int left; /* number of prefix codes available */ in zlib_inflate_table()
44 unsigned short count[MAXBITS+1]; /* number of codes of each length */ in zlib_inflate_table()
46 static const unsigned short lbase[31] = { /* Length codes 257..285 base */ in zlib_inflate_table()
49 static const unsigned short lext[31] = { /* Length codes 257..285 extra */ in zlib_inflate_table()
52 static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ in zlib_inflate_table()
56 static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ in zlib_inflate_table()
63 code lengths are lens[0..codes-1]. Each length corresponds to the in zlib_inflate_table()
64 symbols 0..codes-1. The Huffman code is generated by first sorting the in zlib_inflate_table()
66 for codes with equal lengths. Then the code starts with all zero bits in zlib_inflate_table()
67 for the first code of the shortest length, and the codes are integer in zlib_inflate_table()
71 decoding tables are built in the large loop below, the integer codes in zlib_inflate_table()
79 The codes are sorted by computing a count of codes for each length, in zlib_inflate_table()
86 the minimum and maximum length codes, determining if there are any in zlib_inflate_table()
87 codes at all, checking for a valid set of lengths, and looking ahead in zlib_inflate_table()
92 /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ in zlib_inflate_table()
95 for (sym = 0; sym < codes; sym++) in zlib_inflate_table()
123 if (left > 0 && (type == CODES || max != 1)) in zlib_inflate_table()
132 for (sym = 0; sym < codes; sym++) in zlib_inflate_table()
139 bits off of the bottom. For codes where len is less than drop + curr, in zlib_inflate_table()
151 counts are used for this, and so count[] is decremented as codes are in zlib_inflate_table()
162 all codes of length max, i.e. all codes, have been processed. This in zlib_inflate_table()
163 routine permits incomplete codes, so another loop after this one fills in zlib_inflate_table()
169 case CODES: in zlib_inflate_table()
201 /* process all codes and make table entries */ in zlib_inflate_table()
278 Fill in rest of table for incomplete codes. This loop is similar to the in zlib_inflate_table()