Lines Matching defs:bits
47 /* Bit length codes must not exceed MAX_BL_BITS bits */
53 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
56 /* repeat a zero length 3-10 times (3 bits of repeat count) */
59 /* repeat a zero length 11-138 times (7 bits of repeat count) */
61 local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
64 local const int extra_dbits[D_CODES] /* extra bits for each distance code */
67 local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
77 /* Number of bits used within bi_buf. (bi_buf might be implemented on
78 * more than 16 bits on some systems.)
99 * 5 bits.)
104 * 3 .. 258, the last 256 values correspond to the top 8 bits of
123 const intf *extra_bits; /* extra bits for each code or NULL */
186 * Send a value on a given number of bits.
187 * IN assertion: length <= 16 and value fits in length bits.
195 int length; /* number of bits */
201 /* If not enough room in bi_buf, use (valid) bits from bi_buf and
202 * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
203 * unused bits in value.
243 int bits; /* bit counter */
269 * in two different ways: code 284 + 5 bits or code 285, so we
293 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
502 int bits; /* bit length */
503 int xbits; /* extra bits */
507 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
516 bits = tree[tree[n].Dad].Len + 1;
517 if (bits > max_length) bits = max_length, overflow++;
518 tree[n].Len = (ush)bits;
523 s->bl_count[bits]++;
527 s->opt_len += (ulg)f * (bits + xbits);
537 bits = max_length-1;
538 while (s->bl_count[bits] == 0) bits--;
539 s->bl_count[bits]--; /* move one leaf down the tree */
540 s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
553 for (bits = max_length; bits != 0; bits--) {
554 n = s->bl_count[bits];
558 if ((unsigned) tree[m].Len != (unsigned) bits) {
559 Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
560 s->opt_len += ((long)bits - (long)tree[m].Len)
562 tree[m].Len = (ush)bits;
584 int bits; /* bit index */
590 for (bits = 1; bits <= MAX_BITS; bits++) {
591 next_code[bits] = code = (code + bl_count[bits-1]) << 1;
603 /* Now reverse the bits */
655 /* node is 0 or 1 so it does not have extra bits */
815 * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
883 * This takes 10 bits, of which 7 may remain in the bit buffer.
884 * The current inflate code requires 9 bits of lookahead. If the
886 * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
901 /* Of the 10 bits for the empty block, we have already sent
902 * (10 - bi_valid) bits. The lookahead for the last real code (before
1004 * and uLong implemented on 32 bits.
1081 int extra; /* number of extra bits to send */
1096 send_bits(s, lc, extra); /* send the extra length bits */
1106 send_bits(s, dist, extra); /* send the extra distance bits */
1142 * Reverse the first len bits of a code, using straightforward code (a faster
1159 * Flush the bit buffer, keeping at most 7 bits in it.