Lines Matching refs:huff
249 struct huff { struct
259 static void len2huff(struct huff *huff, char bitlen[], int len) in len2huff() argument
265 memset(huff, 0, sizeof(struct huff)); in len2huff()
266 for (i = 0; i<len; i++) huff->length[bitlen[i]]++; in len2huff()
269 *huff->length = *offset = 0; in len2huff()
270 for (i = 1; i<16; i++) offset[i] = offset[i-1] + huff->length[i-1]; in len2huff()
272 for (i = 0; i<len; i++) if (bitlen[i]) huff->symbol[offset[bitlen[i]]++] = i; in len2huff()
279 static unsigned huff_and_puff(struct bitbuf *bb, struct huff *huff) in huff_and_puff() argument
281 unsigned short *length = huff->length; in huff_and_puff()
289 if ((length - huff->length) & 16) error_exit("bad symbol"); in huff_and_puff()
292 return huff->symbol[start + offset]; in huff_and_puff()
333 struct huff *disthuff, *lithuff; in inflate()
337 struct huff *h2 = ((struct huff *)toybuf)+1; in inflate()
373 len2huff(disthuff = ((struct huff *)toybuf)+2, bits+litlen, distlen); in inflate()
489 len2huff(TT.fixlithuff = ((struct huff *)toybuf)+3, toybuf, 288); in init_deflate()
491 len2huff(TT.fixdisthuff = ((struct huff *)toybuf)+4, toybuf, 30); in init_deflate()