Home | History | Annotate | Download | only in pending

Lines Matching defs:bits

121   // Huffman codes: base offset and extra bits tables (length and distance)
156 // Advance bitpos without the overhead of recording bits
157 void bitbuf_skip(struct bitbuf *bb, int bits)
159 int pos = bb->bitpos + bits, len = bb->len << 3;
182 // Fetch the next X bits from the bitbuf, little endian
183 unsigned bitbuf_get(struct bitbuf *bb, int bits)
187 while (bits) {
193 // grab bits from next byte
196 if (blen > bits) blen = bits;
199 bits -= blen;
245 // Huffman coding uses bits to traverse a binary tree to a leaf node,
247 // used symbols may be represented in fewer bits than uncommon symbols.
340 "\x04\x0c\x03\x0d\x02\x0e\x01\x0f", *bits;
349 // entries, each 3 bits) is used to fill out an array of 19 entries
351 memset(bits = toybuf+1, 0, 19);
352 for (i=0; i<hufflen; i++) bits[hufflen_order[i]] = bitbuf_get(bb, 3);
353 len2huff(h2, bits, 19);
361 if (sym < 16) bits[i++] = sym;
366 memset(bits+i, bits[i-1] * !(sym&3), len);
372 len2huff(lithuff = h2, bits, litlen);
373 len2huff(disthuff = ((struct huff *)toybuf)+2, bits+litlen, distlen);