• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/archival/

Lines Matching refs:G1

302 #define head (G1.prev + WSIZE) /* hash head (see deflate.c) */
329 #define BUF_SIZE (8 * sizeof(G1.bi_buf))
346 #define G1 (*(ptr_to_globals - 1))
355 if (G1.outcnt == 0)
358 xwrite(ofd, (char *) G1.outbuf, G1.outcnt);
359 G1.outcnt = 0;
368 G1.outbuf[G1.outcnt++] = (c); \
369 if (G1.outcnt == OUTBUFSIZ) flush_outbuf(); \
375 if (G1.outcnt < OUTBUFSIZ - 2) {
376 G1.outbuf[G1.outcnt++] = w;
377 G1.outbuf[G1.outcnt++] = w >> 8;
395 G1.outcnt = 0;
397 G1.insize = 0;
399 G1.isize = 0;
410 uint32_t c = G1.crc;
412 c = G1.crc_32_tab[(uch)(c ^ *s++)] ^ (c >> 8);
415 G1.crc = c;
429 Assert(G1.insize == 0, "l_buf not empty");
436 G1.isize += len;
450 G1.bits_sent += length;
456 if (G1.bi_valid > (int) BUF_SIZE - length) {
457 G1.bi_buf |= (value << G1.bi_valid);
458 put_16bit(G1.bi_buf);
459 G1.bi_buf = (ush) value >> (BUF_SIZE - G1.bi_valid);
460 G1.bi_valid += length - BUF_SIZE;
462 G1.bi_buf |= value << G1.bi_valid;
463 G1.bi_valid += length;
491 if (G1.bi_valid > 8) {
492 put_16bit(G1.bi_buf);
493 } else if (G1.bi_valid > 0) {
494 put_8bit(G1.bi_buf);
496 G1.bi_buf = 0;
497 G1.bi_valid = 0;
499 G1.bits_sent = (G1.bits_sent + 7) & ~7;
516 G1.bits_sent += 2 * 16;
520 G1.bits_sent += (ulg) len << 3;
539 unsigned more = WINDOW_SIZE - G1.lookahead - G1.strstart;
550 } else if (G1.strstart >= WSIZE + MAX_DIST) {
556 memcpy(G1.window, G1.window + WSIZE, WSIZE);
557 G1.match_start -= WSIZE;
558 G1.strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
560 G1.block_start -= WSIZE;
567 m = G1.prev[n];
568 G1.prev[n] = (Pos) (m >= WSIZE ? m - WSIZE : 0);
576 if (!G1.eofile) {
577 n = file_read(G1.window + G1.strstart + G1.lookahead, more);
579 G1.eofile = 1;
581 G1.lookahead += n;
603 uch *scan = G1.window + G1.strstart; /* current string */
606 int best_len = G1.prev_length; /* best match length so far */
607 IPos limit = G1.strstart > (IPos) MAX_DIST ? G1.strstart - (IPos) MAX_DIST : 0;
618 uch *strend = G1.window + G1.strstart + MAX_MATCH;
623 if (G1.prev_length >= good_match) {
626 Assert(G1.strstart <= WINDOW_SIZE - MIN_LOOKAHEAD, "insufficient lookahead");
629 Assert(cur_match < G1.strstart, "no future");
630 match = G1.window + cur_match;
661 G1.match_start = cur_match;
668 } while ((cur_match = G1.prev[cur_match & WMASK]) > limit
682 if (memcmp(G1.window + match, G1.window + start, length) != 0) {
689 putc(G1.window[start++], stderr);
1469 Tracev((stderr, "\nbl tree: sent %ld", G1.bits_sent));
1472 Tracev((stderr, "\nlit tree: sent %ld", G1.bits_sent));
1475 Tracev((stderr, "\ndist tree: sent %ld", G1.bits_sent));
1485 G1.l_buf[G2.last_lit++] = lc;
1500 G1.d_buf[G2.last_dist++] = dist;
1515 ulg in_length = (ulg) G1.strstart - G1.block_start;
1553 lc = G1.l_buf[lx++];
1566 dist = G1.d_buf[dx++];
1661 Assert(G2.compressed_len == G1.bits_sent, "bad compressed size");
1698 G1.block_start >= 0L \
1699 ? (char*)&G1.window[(unsigned)G1.block_start] \
1701 (ulg)G1.strstart - G1.block_start, \
1713 UPDATE_HASH(G1.ins_h, G1.window[(s) + MIN_MATCH-1]); \
1714 G1.prev[(s) & WMASK] = match_head = head[G1.ins_h]; \
1715 head[G1.ins_h] = (s); \
1727 while (G1.lookahead != 0) {
1731 INSERT_STRING(G1.strstart, hash_head);
1735 G1.prev_length = match_length;
1736 prev_match = G1.match_start;
1739 if (hash_head != 0 && G1.prev_length < max_lazy_match
1740 && G1.strstart - hash_head <= MAX_DIST
1748 if (match_length > G1.lookahead)
1749 match_length = G1.lookahead;
1752 if (match_length == MIN_MATCH && G1.strstart - G1.match_start > TOO_FAR) {
1753 /* If prev_match is also MIN_MATCH, G1.match_start is garbage
1762 if (G1.prev_length >= MIN_MATCH && match_length <= G1.prev_length) {
1763 check_match(G1.strstart - 1, prev_match, G1.prev_length);
1764 flush = ct_tally(G1.strstart - 1 - prev_match, G1.prev_length - MIN_MATCH);
1769 G1.lookahead -= G1.prev_length - 1;
1770 G1.prev_length -= 2;
1772 G1.strstart++;
1773 INSERT_STRING(G1.strstart, hash_head);
1779 } while (--G1.prev_length != 0);
1782 G1.strstart++;
1785 G1.block_start = G1.strstart;
1792 Tracevv((stderr, "%c", G1.window[G1.strstart - 1]));
1793 if (ct_tally(0, G1.window[G1.strstart - 1])) {
1795 G1.block_start = G1.strstart;
1797 G1.strstart++;
1798 G1.lookahead--;
1804 G1.strstart++;
1805 G1.lookahead--;
1807 Assert(G1.strstart <= G1.isize && lookahead <= G1.isize, "a bit too far");
1814 while (G1.lookahead < MIN_LOOKAHEAD && !G1.eofile)
1818 ct_tally(0, G1.window[G1.strstart - 1]);
1829 G1.bi_buf = 0;
1830 G1.bi_valid = 0;
1832 G1.bits_sent = 0L;
1852 G1.strstart = 0;
1853 G1.block_start = 0L;
1855 G1.lookahead = file_read(G1.window,
1858 if (G1.lookahead == 0 || G1.lookahead == (unsigned) -1) {
1859 G1.eofile = 1;
1860 G1.lookahead = 0;
1863 G1.eofile = 0;
1867 while (G1.lookahead < MIN_LOOKAHEAD && !G1.eofile)
1870 G1.ins_h = 0;
1872 UPDATE_HASH(G1.ins_h, G1.window[j]);
1980 G1.outcnt = 0;
1990 G1.crc = ~0;
2002 put_32bit(~G1.crc);
2003 put_32bit(G1.isize);
2073 ALLOC(uch, G1.l_buf, INBUFSIZ);
2074 ALLOC(uch, G1.outbuf, OUTBUFSIZ);
2075 ALLOC(ush, G1.d_buf, DIST_BUFSIZE);
2076 ALLOC(uch, G1.window, 2L * WSIZE);
2077 ALLOC(ush, G1.prev, 1L << BITS);
2080 G1.crc_32_tab = crc32_filltable(NULL, 0);