Lines Matching defs:bits

174 /* All codes must not exceed MAX_BITS bits */
263 /* Number of bits by which ins_h must be shifted at each input
376 /* Output buffer. bits are inserted starting at the bottom (least
377 * significant bits).
380 /* Number of valid bits in bi_buf. All bits above the last valid bit
650 * output size for (length,distance) codes is <= 32 bits (worst case
1482 /* Bit length codes must not exceed MAX_BL_BITS bits */
1488 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
1491 /* repeat a zero length 3-10 times (3 bits of repeat count) */
1494 /* repeat a zero length 11-138 times (7 bits of repeat count) */
1496 local int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
1499 local int extra_dbits[D_CODES] /* extra bits for each distance code */
1502 local int extra_blbits[BL_CODES]/* extra bits for each bit length code */
1512 /* Number of bits used within bi_buf. (bi_buf might be implemented on
1513 * more than 16 bits on some systems.)
1530 * 5 bits.)
1535 * 3 .. 258, the last 256 values correspond to the top 8 bits of
1550 intf *extra_bits; /* extra bits for each code or NULL */
1616 * Send a value on a given number of bits.
1617 * IN assertion: length <= 16 and value fits in length bits.
1625 int length; /* number of bits */
1631 /* If not enough room in bi_buf, use (valid) bits from bi_buf and
1632 * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
1633 * unused bits in value.
1673 int bits; /* bit counter */
1690 * in two different ways: code 284 + 5 bits or code 285, so we
1714 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
1860 int bits; /* bit length */
1861 int xbits; /* extra bits */
1865 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
1874 bits = tree[tree[n].Dad].Len + 1;
1875 if (bits > max_length) bits = max_length, overflow++;
1876 tree[n].Len = (ush)bits;
1881 s->bl_count[bits]++;
1885 s->opt_len += (ulg)f * (bits + xbits);
1895 bits = max_length-1;
1896 while (s->bl_count[bits] == 0) bits--;
1897 s->bl_count[bits]--; /* move one leaf down the tree */
1898 s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
1911 for (bits = max_length; bits != 0; bits--) {
1912 n = s->bl_count[bits];
1916 if (tree[m].Len != (unsigned) bits) {
1917 Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
1918 s->opt_len += ((long)bits - (long)tree[m].Len)
1920 tree[m].Len = (ush)bits;
1942 int bits; /* bit index */
1948 for (bits = 1; bits <= MAX_BITS; bits++) {
1949 next_code[bits] = code = (code + bl_count[bits-1]) << 1;
1961 /* Now reverse the bits */
2013 /* node is 0 or 1 so it does not have extra bits */
2172 * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
2250 * This takes 10 bits, of which 7 may remain in the bit buffer.
2251 * The current inflate code requires 9 bits of lookahead. If the EOB
2252 * code for the previous block was coded on 5 bits or less, inflate
2253 * may have only 5+3 bits of lookahead to decode this EOB.
2263 /* Of the 10 bits for the empty block, we have already sent
2264 * (10 - bi_valid) bits. The lookahead for the EOB of the previous
2460 int extra; /* number of extra bits to send */
2475 send_bits(s, lc, extra); /* send the extra length bits */
2485 send_bits(s, dist, extra); /* send the extra distance bits */
2517 * Reverse the first len bits of a code, using straightforward code (a faster
2534 * Flush the bit buffer, keeping at most 7 bits in it.
2657 Byte Exop; /* number of extra bits or operation */
2658 Byte Bits; /* number of bits in this code or subcode */
2675 uIntf *, /* bits tree desired/actual depth */
2676 inflate_huft * FAR *, /* bits tree result */
3052 TYPE, /* get type bits (3, including end bit) */
3068 uInt table; /* table lengths (14 bits) */
3084 uInt bitk; /* bits in bit buffer */
3103 /* get bytes and bits */
3119 /* And'ing with mask[n] masks the lower n bits */
3168 3. There is an implied maximum of 7 bits for the bit length table and
3169 15 bits for the actual data.
3177 zero distance codes, which is sent as one code of zero bits in
3182 cannot be used though, since there is no length base or extra bits
3184 However, static trees define 32 codes (all 5 bits) to fill out the
3188 8. The five bits following the block type is really the number of
3190 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
3264 uInt k; /* bits in bit buffer */
3334 b = k = 0; /* dump bits */
3400 Tracev((stderr, "inflate: bits tree ok\n"));
3545 uInt k; /* bits in bit buffer */ /* NOT USED HERE */
3610 #define bits word.what.Bits
3614 uIntf *, /* code lengths in bits */
3618 uIntf *, /* list of extra bits for non-simple codes */
3620 uIntf *, /* maximum lookup bits (returns actual) */
3638 local uInt cplext[] = { /* Extra bits for literal codes 257..285 */
3645 local uInt cpdext[] = { /* Extra bits for distance codes */
3663 below. lbits is the number of bits the first level table for literal/
3668 bits is used, or when the shortest code is *longer* than the requested
3669 table size, in which case the length of the shortest code in bits is
3675 bits. The distance table codes 30 possible values, or a little less
3676 than five bits, flat. The optimum values for speed end up being
3692 uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
3696 uIntf *e; /* list of extra bits for non-simple codes */
3698 uIntf *m; /* maximum lookup bits, returns actual */
3714 register int k; /* number of bits in current code */
3715 int l; /* bits per table (returned in m) */
3721 register int w; /* bits before this table == (l * h) */
3792 w = -l; /* bits decoded == (l * h) */
3797 /* go through the bit lengths (k already is bits in shortest code) */
3803 /* here i is the Huffman code of length k bits for value *p */
3808 w += l; /* previous table always l bits */
3810 /* compute minimum size table less than or equal to l bits */
3817 while (++j < z) /* try smaller tables up to z bits */
3820 break; /* enough codes to use up j bits */
3846 r.bits = (Byte)l; /* bits to dump before this table */
3847 r.exop = (Byte)j; /* bits in this table */
3855 r.bits = (Byte)(k - w);
3896 uIntf *bb; /* bits tree desired/actual depth */
3897 inflate_huft * FAR *tb; /* bits tree result */
4080 #define bits word.what.Bits
4104 uInt need; /* bits needed */
4108 uInt get; /* bits to get for extra */
4114 Byte lbits; /* ltree bits decoded per branch */
4115 Byte dbits; /* dtree bits decoder per branch */
4150 uInt e; /* extra bits or operation */
4152 uInt k; /* bits in bit buffer */
4187 DUMPBITS(t->bits)
4234 DUMPBITS(t->bits)
4398 #define bits word.what.Bits
4416 uInt e; /* extra bits or operation */
4418 uInt k; /* bits in bit buffer */
4439 GRABBITS(20) /* max bits for literal/length code */
4442 DUMPBITS(t->bits)
4451 DUMPBITS(t->bits)
4454 /* get extra bits for length */
4461 GRABBITS(15); /* max bits for distance code */
4464 DUMPBITS(t->bits)
4467 /* get extra bits to add to distance base */
4469 GRABBITS(e) /* get extra bits (up to 13) */
4516 DUMPBITS(t->bits)