Lines Matching +refs:val +refs:len
40 unsigned len; /* a code's length in bits */
107 for (len = 0; len <= MAXBITS; len++)
108 count[len] = 0;
120 here.val = (unsigned short)0;
132 for (len = 1; len <= MAXBITS; len++) {
134 left -= count[len];
142 for (len = 1; len < MAXBITS; len++)
143 offs[len + 1] = offs[len] + count[len];
152 with length len. That code is converted to an index by dropping drop
153 bits off of the bottom. For codes where len is less than drop + curr,
154 those top drop + curr - len bits are incremented through all values to
157 root is the number of index bits for the root table. When len exceeds
202 len = min; /* starting code length */
206 low = (unsigned)(-1); /* trigger new sub-table when len > root */
218 here.bits = (unsigned char)(len - drop);
221 here.val = work[sym];
225 here.val = base[work[sym]];
229 here.val = 0;
232 /* replicate for those indices with low len bits equal to huff */
233 incr = 1U << (len - drop);
241 /* backwards increment the len-bit code huff */
242 incr = 1U << (len - 1);
252 /* go to next symbol, update count, len */
254 if (--(count[len]) == 0) {
255 if (len == max) break;
256 len = lens[work[sym]];
260 if (len > root && (huff & mask) != low) {
269 curr = len - drop;
288 (*table)[low].val = (unsigned short)(next - *table);
297 here.bits = (unsigned char)(len - drop);
298 here.val = (unsigned short)0;