Lines Matching refs:bits
30 * - Add comments on state->bits assertion in inffast.c
122 state->bits = 0;
128 int ZEXPORT inflatePrime(strm, bits, value)
130 int bits;
137 if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
138 value &= (1L << bits) - 1;
139 state->hold += value << state->bits;
140 state->bits += bits;
215 unsigned sym, bits;
226 bits = 9;
227 inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
233 bits = 5;
234 inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
289 printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
300 printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
410 bits = state->bits; \
421 state->bits = bits; \
428 bits = 0; \
437 hold += (unsigned long)(*next++) << bits; \
438 bits += 8; \
441 /* Assure that there are at least n bits in the bit accumulator. If there is
445 while (bits < (unsigned)(n)) \
449 /* Return the low n bits of the bit accumulator (n < 16) */
453 /* Remove n bits from the bit accumulator */
457 bits -= (unsigned)(n); \
460 /* Remove zero to seven bits as needed to go to a byte boundary */
463 hold >>= bits & 7; \
464 bits -= bits & 7; \
492 the requested bits are not available. The typical use of the BITS macros
500 input left to load n bits into the accumulator, or it continues. BITS(n)
501 gives the low n bits in the accumulator. When done, DROPBITS(n) drops
502 the low n bits off the accumulator. INITBITS() clears the accumulator
503 and sets the number of available bits to zero. BYTEBITS() discards just
504 enough bits to put the accumulator on a byte boundary. After BYTEBITS()
563 unsigned bits; /* bits in bit buffer */
569 unsigned len; /* length to copy for repeats, bits to drop */
880 if ((unsigned)(this.bits) <= bits) break;
884 NEEDBITS(this.bits);
885 DROPBITS(this.bits);
890 NEEDBITS(this.bits + 2);
891 DROPBITS(this.bits);
902 NEEDBITS(this.bits + 3);
903 DROPBITS(this.bits);
909 NEEDBITS(this.bits + 7);
910 DROPBITS(this.bits);
959 if ((unsigned)(this.bits) <= bits) break;
966 (BITS(last.bits + last.op) >> last.bits)];
967 if ((unsigned)(last.bits + this.bits) <= bits) break;
970 DROPBITS(last.bits);
972 DROPBITS(this.bits);
1004 if ((unsigned)(this.bits) <= bits) break;
1011 (BITS(last.bits + last.op) >> last.bits)];
1012 if ((unsigned)(last.bits + this.bits) <= bits) break;
1015 DROPBITS(last.bits);
1017 DROPBITS(this.bits);
1148 strm->data_type = state->bits + (state->last ? 64 : 0) +
1273 if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
1278 state->hold <<= state->bits & 7;
1279 state->bits -= state->bits & 7;
1281 while (state->bits >= 8) {
1284 state->bits -= 8;
1320 return state->mode == STORED && state->bits == 0;