Lines Matching defs:bits
50 /* Bit length codes must not exceed MAX_BL_BITS bits */
56 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
59 /* repeat a zero length 3-10 times (3 bits of repeat count) */
62 /* repeat a zero length 11-138 times (7 bits of repeat count) */
64 local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
67 local const int extra_dbits[D_CODES] /* extra bits for each distance code */
70 local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
97 * 5 bits.)
102 * 3 .. 258, the last 256 values correspond to the top 8 bits of
121 const intf *extra_bits; /* extra bits for each code or NULL */
182 * Send a value on a given number of bits.
183 * IN assertion: length <= 16 and value fits in length bits.
191 int length; /* number of bits */
197 /* If not enough room in bi_buf, use (valid) bits from bi_buf and
198 * (16 - bi_valid) bits from value, leaving (width - (16 - bi_valid))
199 * unused bits in value.
239 int bits; /* bit counter */
267 * in two different ways: code 284 + 5 bits or code 285, so we
291 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
500 int bits; /* bit length */
501 int xbits; /* extra bits */
505 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
514 bits = tree[tree[n].Dad].Len + 1;
515 if (bits > max_length) bits = max_length, overflow++;
516 tree[n].Len = (ush)bits;
521 s->bl_count[bits]++;
525 s->opt_len += (ulg)f * (unsigned)(bits + xbits);
535 bits = max_length - 1;
536 while (s->bl_count[bits] == 0) bits--;
537 s->bl_count[bits]--; /* move one leaf down the tree */
538 s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */
551 for (bits = max_length; bits != 0; bits--) {
552 n = s->bl_count[bits];
556 if ((unsigned) tree[m].Len != (unsigned) bits) {
557 Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
558 s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
559 tree[m].Len = (ush)bits;
581 int bits; /* bit index */
587 for (bits = 1; bits <= MAX_BITS; bits++) {
588 code = (code + bl_count[bits - 1]) << 1;
589 next_code[bits] = (ush)code;
601 /* Now reverse the bits */
653 /* node is 0 or 1 so it does not have extra bits */
813 * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts.
887 * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
897 * This takes 10 bits, of which 7 may remain in the bit buffer.
998 * and uLong implemented on 32 bits.
1053 int extra; /* number of extra bits to send */
1069 send_bits(s, lc, extra); /* send the extra length bits */
1079 send_bits(s, dist, extra); /* send the extra distance bits */
1108 * set bits 0..6, 14..25, and 28..31
1134 * Reverse the first len bits of a code, using straightforward code (a faster
1151 * Flush the bit buffer, keeping at most 7 bits in it.