Lines Matching refs:bits

320 /* All codes must not exceed MAX_BITS bits */
417 * Number of bits by which ins_h must be shifted at each input
553 * Output buffer. bits are inserted starting at the bottom
554 * (least significant bits).
558 * Number of valid bits in bi_buf. All bits above the last
869 * 24 bits.
2256 /* Bit length codes must not exceed MAX_BL_BITS bits */
2262 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
2265 /* repeat a zero length 3-10 times (3 bits of repeat count) */
2268 /* repeat a zero length 11-138 times (7 bits of repeat count) */
2270 /* extra bits for each length code */
2275 /* extra bits for each distance code */
2280 /* extra bits for each bit length code */
2295 * Number of bits used within bi_buf. (bi_buf might be implemented on
2296 * more than 16 bits on some systems.)
2316 * use 5 bits.)
2322 * .. 258, the last 256 values correspond to the top 8 bits of the 15
2337 const intf *extra_bits; /* extra bits for each code or NULL */
2399 * Send a value on a given number of bits.
2400 * IN assertion: length <= 16 and value fits in length bits.
2409 int length; /* number of bits */
2416 * If not enough room in bi_buf, use (valid) bits from bi_buf
2417 * and (16 - bi_valid) bits from value, leaving (width -
2418 * (16-bi_valid)) unused bits in value.
2462 int bits; /* bit counter */
2490 * represented in two different ways: code 284 + 5 bits or
2515 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
2668 int bits; /* bit length */
2669 int xbits; /* extra bits */
2674 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
2684 bits = tree[tree[n].Dad].Len + 1;
2685 if (bits > max_length) bits = max_length, overflow++;
2686 tree[n].Len = (ush)bits;
2691 s->bl_count[bits]++;
2695 s->opt_len += (ulg)f * (bits + xbits);
2706 bits = max_length-1;
2707 while (s->bl_count[bits] == 0) bits--;
2708 s->bl_count[bits]--; /* move one leaf down the tree */
2710 s->bl_count[bits+1] += 2;
2727 for (bits = max_length; bits != 0; bits--) {
2728 n = s->bl_count[bits];
2732 if (tree[m].Len != (unsigned)bits) {
2733 Trace((stderr, "code %d bits %d->%d\n", m,
2734 tree[m].Len, bits));
2735 s->opt_len += ((long)bits - (long)tree[m].Len)
2737 tree[m].Len = (ush)bits;
2762 int bits; /* bit index */
2769 for (bits = 1; bits <= MAX_BITS; bits++) {
2770 next_code[bits] = code = (code + bl_count[bits-1]) << 1;
2783 /* Now reverse the bits */
2842 /* node is 0 or 1 so it does not have extra bits */
3022 * codes and the 5+5+4 bits for the counts.
3118 * This takes 10 bits, of which 7 may remain in the bit buffer.
3119 * The current inflate code requires 9 bits of lookahead. If the
3121 * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
3136 * Of the 10 bits for the empty block, we have already sent
3137 * (10 - bi_valid) bits. The lookahead for the last real code
3284 * MB and uLong implemented on 32 bits.
3368 int extra; /* number of extra bits to send */
3385 /* send the extra length bits */
3398 /* send the extra distance bits */
3439 * Reverse the first len bits of a code, using straightforward code (a faster
3458 * Flush the bit buffer, keeping at most 7 bits in it.
4055 Byte Exop; /* number of extra bits or operation */
4056 /* number of bits in this code or subcode */
4076 uIntf *, /* bits tree desired/actual depth */
4077 inflate_huft * FAR *, /* bits tree result */
4150 TYPE, /* get type bits (3, including end bit) */
4172 uInt table; /* table lengths (14 bits) */
4185 uInt bitk; /* bits in bit buffer */
4205 /* get bytes and bits */
4224 /* masks for lower bits (size given to avoid silly warnings with Visual C++) */
4254 * 3. There is an implied maximum of 7 bits for the bit length table and
4255 * 15 bits for the actual data.
4263 * zero distance codes, which is sent as one code of zero bits in
4268 * cannot be used though, since there is no length base or extra bits
4270 * However, static trees define 32 codes (all 5 bits) to fill out the
4274 * 8. The five bits following the block type is really the number of
4276 * 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
4359 uInt k; /* bits in bit buffer */
4431 b = k = 0; /* dump bits */
4504 Tracev((stderr, "inflate: bits tree ok\n"));
4678 uInt k; /* bits in bit buffer */ /* NOT USED HERE */
4760 #define bits word.what.Bits
4764 uIntf *, /* code lengths in bits */
4768 const uIntf *, /* list of extra bits for non-simple codes */
4770 uIntf *, /* maximum lookup bits (returns actual) */
4780 local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
4788 local const uInt cpdext[30] = { /* Extra bits for distance codes */
4807 * below. lbits is the number of bits the first level table for
4812 * code length in bits is used, or when the shortest code is *longer*
4814 * shortest code in bits is used.
4819 * bits. The distance table codes 30 possible values, or a little
4820 * less than five bits, flat. The optimum values for speed end up
4833 uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
4837 const uIntf *e; /* list of extra bits for non-simple codes */
4839 uIntf *m; /* maximum lookup bits, returns actual */
4860 register int k; /* number of bits in current code */
4861 int l; /* bits per table (returned in m) */
4867 register int w; /* bits before this table == (l * h) */
4939 w = -l; /* bits decoded == (l * h) */
4944 /* go through the bit lengths (k already is bits in shortest code) */
4949 * here i is the Huffman code of length k bits
4955 w += l; /* previous table always l bits */
4959 * than or equal to l bits
4973 * up to z bits
4980 * bits
5007 /* bits to dump before this table */
5008 r.bits = (Byte)l;
5009 /* bits in this table */
5022 r.bits = (Byte)(k - w);
5070 uIntf *bb; /* bits tree desired/actual depth */
5071 inflate_huft * FAR *tb; /* bits tree result */
5261 #define bits word.what.Bits
5285 uInt need; /* bits needed */
5289 uInt get; /* bits to get for extra */
5295 Byte lbits; /* ltree bits decoded per branch */
5296 Byte dbits; /* dtree bits decoder per branch */
5334 uInt e; /* extra bits or operation */
5336 uInt k; /* bits in bit buffer */
5376 DUMPBITS(t->bits);
5424 DUMPBITS(t->bits);
5533 /* And'ing with mask[n] masks the lower n bits */
5634 #define bits word.what.Bits
5657 uInt e; /* extra bits or operation */
5659 uInt k; /* bits in bit buffer */
5680 /* max bits for literal/length code */
5683 DUMPBITS(t->bits);
5692 DUMPBITS(t->bits);
5694 /* get extra bits for length */
5702 GRABBITS(15); /* max bits for distance code */
5705 DUMPBITS(t->bits);
5708 * get extra bits to
5713 /* get extra bits (up to 13) */
5785 DUMPBITS(t->bits);