Lines Matching refs:code

23    Build a set of tables to decode the provided canonical Huffman code.
24 The code lengths are lens[0..codes-1]. The result starts at *table,
26 lens shorts, which is used as a work area. type is the type of code
28 -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
32 longest code or if it is less than the shortest code.
38 code FAR * FAR *table;
42 unsigned len; /* a code's length in bits */
43 unsigned sym; /* index of code symbols */
44 unsigned min, max; /* minimum and maximum code lengths */
47 unsigned drop; /* code bits to drop for sub-table */
49 unsigned used; /* code entries in table used */
50 unsigned huff; /* Huffman code */
51 unsigned incr; /* for incrementing code, index */
55 code this; /* table entry for duplication */
56 code FAR *next; /* next available space in table */
78 Process a set of code lengths to create a canonical Huffman code. The
79 code lengths are lens[0..codes-1]. Each length corresponds to the
80 symbols 0..codes-1. The Huffman code is generated by first sorting the
82 for codes with equal lengths. Then the code starts with all zero bits
83 for the first code of the shortest length, and the codes are integer
92 1..MAXBITS is interpreted as that code length. zero means that that
93 symbol does not occur in this code.
114 /* bound code lengths, force root to be within code lengths */
119 if (max == 0) { /* no symbols to code at all */
120 this.op = (unsigned char)64; /* invalid code marker */
153 filled is at next and has curr index bits. The code being used is huff
154 with length len. That code is converted to an index by dropping drop
166 code lengths to determine what size sub-table is needed. The length
173 the worst case distance code, MAXD. This should never happen, but the
180 in the rest of the decoding tables with invalid code markers.
183 /* set up for code type */
203 huff = 0; /* starting code */
204 sym = 0; /* starting code symbol */
205 len = min; /* starting code length */
208 drop = 0; /* current bits to drop from code for index */
243 /* backwards increment the len-bit code huff */
300 this.op = (unsigned char)64; /* invalid code marker */
312 /* put invalid code marker in table */
315 /* backwards increment the len-bit code huff */