Lines Matching defs:Bits
327 /* All codes must not exceed MAX_BITS bits */
415 /* Number of bits by which ins_h must be shifted at each input
528 /* Output buffer. bits are inserted starting at the bottom (least
529 * significant bits).
532 /* Number of valid bits in bi_buf. All bits above the last valid bit
822 * output size for (length,distance) codes is <= 24 bits.
2017 /* Bit length codes must not exceed MAX_BL_BITS bits */
2023 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
2026 /* repeat a zero length 3-10 times (3 bits of repeat count) */
2029 /* repeat a zero length 11-138 times (7 bits of repeat count) */
2031 local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
2034 local const int extra_dbits[D_CODES] /* extra bits for each distance code */
2037 local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
2047 /* Number of bits used within bi_buf. (bi_buf might be implemented on
2048 * more than 16 bits on some systems.)
2069 * 5 bits.)
2074 * 3 .. 258, the last 256 values correspond to the top 8 bits of
2223 const intf *extra_bits; /* extra bits for each code or NULL */
2286 * Send a value on a given number of bits.
2287 * IN assertion: length <= 16 and value fits in length bits.
2295 int length; /* number of bits */
2301 /* If not enough room in bi_buf, use (valid) bits from bi_buf and
2302 * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
2303 * unused bits in value.
2341 int bits; /* bit counter */
2367 * in two different ways: code 284 + 5 bits or code 285, so we
2391 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
2596 int bits; /* bit length */
2597 int xbits; /* extra bits */
2601 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
2610 bits = tree[tree[n].Dad].Len + 1;
2611 if (bits > max_length) bits = max_length, overflow++;
2612 tree[n].Len = (ush)bits;
2617 s->bl_count[bits]++;
2621 s->opt_len += (ulg)f * (bits + xbits);
2631 bits = max_length-1;
2632 while (s->bl_count[bits] == 0) bits--;
2633 s->bl_count[bits]--; /* move one leaf down the tree */
2634 s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
2647 for (bits = max_length; bits != 0; bits--) {
2648 n = s->bl_count[bits];
2652 if (tree[m].Len != (unsigned) bits) {
2653 Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
2654 s->opt_len += ((long)bits - (long)tree[m].Len)
2656 tree[m].Len = (ush)bits;
2677 int bits; /* bit index */
2683 for (bits = 1; bits <= MAX_BITS; bits++) {
2684 next_code[bits] = code = (code + bl_count[bits-1]) << 1;
2696 /* Now reverse the bits */
2747 /* node is 0 or 1 so it does not have extra bits */
2903 * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
2980 * This takes 10 bits, of which 7 may remain in the bit buffer.
2981 * The current inflate code requires 9 bits of lookahead. If the
2983 * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
2997 /* Of the 10 bits for the empty block, we have already sent
2998 * (10 - bi_valid) bits. The lookahead for the last real code (before
3098 * and uLong implemented on 32 bits.
3175 int extra; /* number of extra bits to send */
3190 send_bits(s, lc, extra); /* send the extra length bits */
3200 send_bits(s, dist, extra); /* send the extra distance bits */
3231 * Reverse the first len bits of a code, using straightforward code (a faster
3247 * Flush the bit buffer, keeping at most 7 bits in it.
3789 Byte Exop; /* number of extra bits or operation */
3790 Byte Bits; /* number of bits in this code or subcode */
3807 uIntf *, /* bits tree desired/actual depth */
3808 inflate_huft * FAR *, /* bits tree result */
3878 TYPE, /* get type bits (3, including end bit) */
3900 uInt table; /* table lengths (14 bits) */
3914 uInt bitk; /* bits in bit buffer */
3934 /* get bytes and bits */
3950 /* masks for lower bits (size given to avoid silly warnings with Visual C++) */
3972 #define bits word.what.Bits
3984 3. There is an implied maximum of 7 bits for the bit length table and
3985 15 bits for the actual data.
3993 zero distance codes, which is sent as one code of zero bits in
3998 cannot be used though, since there is no length base or extra bits
4000 However, static trees define 32 codes (all 5 bits) to fill out the
4004 8. The five bits following the block type is really the number of
4006 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
4012 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
4074 uInt k; /* bits in bit buffer */
4142 b = k = 0; /* dump bits */
4208 Tracev((stderr, "inflate: bits tree ok\n"));
4220 t = h->bits;
4352 uInt k; /* bits in bit buffer */ /* NOT USED HERE */
4448 #define bits word.what.Bits
4452 uIntf *, /* code lengths in bits */
4456 const uIntf *, /* list of extra bits for non-simple codes */
4458 uIntf *, /* maximum lookup bits (returns actual) */
4468 local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
4475 local const uInt cpdext[30] = { /* Extra bits for distance codes */
4493 below. lbits is the number of bits the first level table for literal/
4498 bits is used, or when the shortest code is *longer* than the requested
4499 table size, in which case the length of the shortest code in bits is
4505 bits. The distance table codes 30 possible values, or a little less
4506 than five bits, flat. The optimum values for speed end up being
4516 local int huft_build(uIntf *b, /* code lengths in bits (all assumed <= BMAX) */
4520 const uIntf *e, /* list of extra bits for non-simple codes */
4522 uIntf *m, /* maximum lookup bits, returns actual */
4540 int k; /* number of bits in current code */
4541 int l; /* bits per table (returned in m) */
4547 int w; /* bits before this table == (l * h) */
4620 w = -l; /* bits decoded == (l * h) */
4625 /* go through the bit lengths (k already is bits in shortest code) */
4631 /* here i is the Huffman code of length k bits for value *p */
4636 w += l; /* previous table always l bits */
4638 /* compute minimum size table less than or equal to l bits */
4646 while (++j < z) /* try smaller tables up to z bits */
4649 break; /* enough codes to use up j bits */
4665 r.bits = (Byte)l; /* bits to dump before this table */
4666 r.exop = (Byte)j; /* bits in this table */
4676 r.bits = (Byte)(k - w);
4720 uIntf *bb, /* bits tree desired/actual depth */
4721 inflate_huft * FAR *tb, /* bits tree result */
5071 #define bits word.what.Bits
5097 uInt need; /* bits needed */
5101 uInt get; /* bits to get for extra */
5107 Byte lbits; /* ltree bits decoded per branch */
5108 Byte dbits; /* dtree bits decoder per branch */
5138 uInt e; /* extra bits or operation */
5140 uInt k; /* bits in bit buffer */
5176 DUMPBITS(t->bits)
5224 DUMPBITS(t->bits)
5323 /* And'ing with mask[n] masks the lower n bits */
5420 #define bits word.what.Bits
5438 uInt e; /* extra bits or operation */
5440 uInt k; /* bits in bit buffer */
5461 GRABBITS(20) /* max bits for literal/length code */
5464 DUMPBITS(t->bits)
5473 DUMPBITS(t->bits)
5476 /* get extra bits for length */
5483 GRABBITS(15); /* max bits for distance code */
5486 DUMPBITS(t->bits)
5489 /* get extra bits to add to distance base */
5491 GRABBITS(e) /* get extra bits (up to 13) */
5555 DUMPBITS(t->bits)