Home | History | Annotate | Download | only in pending

Lines Matching refs:TT

169   int pos = TT.pos++ & 32767;
171 TT.data[pos] = sym;
174 xwrite(TT.outfd, TT.data, 32768);
175 if (TT.crcfunc) TT.crcfunc(TT.data, 32768);
229 // Decompress deflated data from bitbuf to TT.outfd.
232 TT.crc = ~0;
311 lithuff = TT.fixlithuff;
312 disthuff = TT.fixdisthuff;
327 len = TT.lenbase[sym] + bitbuf_get(bb, TT.lenbits[sym]);
329 dist = TT.distbase[sym] + bitbuf_get(bb, TT.distbits[sym]);
330 sym = TT.pos & 32767;
332 while (len--) output_byte(TT.data[(TT.pos-dist) & 32767]);
343 if (TT.pos & 32767) {
344 xwrite(TT.outfd, TT.data, TT.pos & 32767);
345 if (TT.crcfunc) TT.crcfunc(TT.data, TT.pos & 32767);
349 // Deflate from TT.infd to bitbuf
350 // For deflate, TT.len = input read, TT.pos = input consumed
353 char *data = TT.data;
356 TT.crc = ~0;
360 len = readall(TT.infd, data+(TT.len&32768), 32768);
363 if (TT.crcfunc) TT.crcfunc(data+(TT.len&32768), len);
364 // TT.len += len; crcfunc advances len
375 while (TT.pos != TT.len) {
376 unsigned pos = TT.pos & 65535;
381 if (!(32767 & ++TT.pos) && !final) break;
394 TT.data = xmalloc(32768*(compress ? 4 : 1));
396 TT.hashhead = (unsigned short *)(TT.data + 65536);
397 TT.hashchain = (unsigned short *)(TT.data + 65536 + 32768);
401 *TT.lenbase = 3;
402 for (i = 0; i<sizeof(TT.lenbits)-1; i++) {
405 TT.lenbits[i]++;
409 else TT.lenbits[i+1] = TT.lenbits[i];
411 TT.lenbase[i+1] = n + TT.lenbase[i];
414 for (i = 0; i<sizeof(TT.distbits); i++) {
415 TT.distbase[i] = 1<<n;
416 if (i) TT.distbase[i] += TT.distbase[i-1];
418 TT.distbits[i] = n;
423 len2huff(TT.fixlithuff = ((struct huff *)toybuf)+3, toybuf, 288);
425 len2huff(TT.fixdisthuff = ((struct huff *)toybuf)+4, toybuf, 30);
452 crc = TT.crc;
454 TT.crc = crc;
455 TT.len += len;
467 TT.infd = fd;
472 TT.crcfunc = gzip_crc;
479 bitbuf_put(bb, ~TT.crc, 32);
480 bitbuf_put(bb, TT.len, 32);
491 TT.outfd = 1;
495 TT.crcfunc = gzip_crc;
502 if (~TT.crc != bitbuf_get(bb, 32) || TT.len != bitbuf_get(bb, 32))