Lines Matching refs:G1

337 #define head (G1.prev + WSIZE) /* hash head (see deflate.c) */
345 #define comp_level_minus4 (G1.comp_level_minus4)
346 #define max_chain_length (G1.max_chain_length)
347 #define max_lazy_match (G1.max_lazy_match)
348 #define good_match (G1.good_match)
349 #define nice_match (G1.nice_match)
404 #define BUF_SIZE (int)(8 * sizeof(G1.bi_buf))
413 # define DEBUG_bits_sent(v) (void)(G1.bits_sent v)
419 #define G1 (*(ptr_to_globals - 1)) macro
427 if (G1.outcnt == 0) in flush_outbuf()
430 xwrite(ofd, (char *) G1.outbuf, G1.outcnt); in flush_outbuf()
431 G1.outcnt = 0; in flush_outbuf()
439 G1.outbuf[G1.outcnt++] = (c); \
440 if (G1.outcnt == OUTBUFSIZ) \
451 unsigned outcnt = G1.outcnt; in put_16bit()
452 uch *dst = &G1.outbuf[outcnt]; in put_16bit()
459 G1.outcnt = outcnt + 2; in put_16bit()
464 G1.outcnt = ++outcnt; in put_16bit()
471 G1.outcnt = outcnt + 2; in put_16bit()
474 G1.outcnt = ++outcnt; in put_16bit()
487 unsigned outcnt = G1.outcnt; in put_32bit()
490 ulg *dst32 = (void*) &G1.outbuf[outcnt]; in put_32bit()
493 G1.outcnt = outcnt + 4; in put_32bit()
514 G1.crc = crc32_block_endian0(G1.crc, s, n, global_crc32_table /*G1.crc_32_tab*/); in updcrc()
526 Assert(G1.insize == 0, "l_buf not empty"); in file_read()
533 G1.isize += len; in file_read()
552 new_buf = G1.bi_buf | (value << G1.bi_valid); in send_bits()
555 length += G1.bi_valid; in send_bits()
563 value >>= (BUF_SIZE - G1.bi_valid); in send_bits()
572 G1.bi_buf = new_buf; in send_bits()
573 G1.bi_valid = length; in send_bits()
598 unsigned bits = G1.bi_buf; in bi_windup()
599 int cnt = G1.bi_valid; in bi_windup()
606 G1.bi_buf = 0; in bi_windup()
607 G1.bi_valid = 0; in bi_windup()
608 DEBUG_bits_sent(= (G1.bits_sent + 7) & ~7); in bi_windup()
629 if (G1.outcnt & 3) /* syscalls are expensive, is it really misaligned? */ in copy_block()
644 unsigned more = WINDOW_SIZE - G1.lookahead - G1.strstart; in fill_window()
655 } else if (G1.strstart >= WSIZE + MAX_DIST) { in fill_window()
661 memcpy(G1.window, G1.window + WSIZE, WSIZE); in fill_window()
662 G1.match_start -= WSIZE; in fill_window()
663 G1.strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */ in fill_window()
665 G1.block_start -= WSIZE; in fill_window()
672 m = G1.prev[n]; in fill_window()
673 G1.prev[n] = (Pos) (m >= WSIZE ? m - WSIZE : 0); in fill_window()
681 if (!G1.eofile) { in fill_window()
682 n = file_read(G1.window + G1.strstart + G1.lookahead, more); in fill_window()
684 G1.eofile = 1; in fill_window()
686 G1.lookahead += n; in fill_window()
693 while (G1.lookahead < MIN_LOOKAHEAD && !G1.eofile) in fill_window_if_needed()
713 uch *scan = G1.window + G1.strstart; /* current string */ in longest_match()
716 int best_len = G1.prev_length; /* best match length so far */ in longest_match()
717 IPos limit = G1.strstart > (IPos) MAX_DIST ? G1.strstart - (IPos) MAX_DIST : 0; in longest_match()
728 uch *strend = G1.window + G1.strstart + MAX_MATCH; in longest_match()
733 if (G1.prev_length >= good_match) { in longest_match()
736 Assert(G1.strstart <= WINDOW_SIZE - MIN_LOOKAHEAD, "insufficient lookahead"); in longest_match()
739 Assert(cur_match < G1.strstart, "no future"); in longest_match()
740 match = G1.window + cur_match; in longest_match()
773 G1.match_start = cur_match; in longest_match()
780 } while ((cur_match = G1.prev[cur_match & WMASK]) > limit in longest_match()
793 if (memcmp(G1.window + match, G1.window + start, length) != 0) { in check_match()
800 bb_putchar_stderr(G1.window[start++]); in check_match()
1560 Tracev((stderr, "\nbl tree: sent %ld", (long)G1.bits_sent)); in send_all_trees()
1563 Tracev((stderr, "\nlit tree: sent %ld", (long)G1.bits_sent)); in send_all_trees()
1566 Tracev((stderr, "\ndist tree: sent %ld", (long)G1.bits_sent)); in send_all_trees()
1575 G1.l_buf[G2.last_lit++] = lc; in ct_tally()
1590 G1.d_buf[G2.last_dist++] = dist; in ct_tally()
1605 ulg in_length = (ulg) G1.strstart - G1.block_start; in ct_tally()
1644 lc = G1.l_buf[lx++]; in compress_block()
1657 dist = G1.d_buf[dx++]; in compress_block()
1790 G1.block_start >= 0L \
1791 ? (char*)&G1.window[(unsigned)G1.block_start] \
1793 (ulg)G1.strstart - G1.block_start, \
1805 UPDATE_HASH(G1.ins_h, G1.window[(s) + MIN_MATCH-1]); \
1806 G1.prev[(s) & WMASK] = match_head = head[G1.ins_h]; \
1807 head[G1.ins_h] = (s); \
1819 while (G1.lookahead != 0) { in deflate()
1823 INSERT_STRING(G1.strstart, hash_head); in deflate()
1827 G1.prev_length = match_length; in deflate()
1828 prev_match = G1.match_start; in deflate()
1831 if (hash_head != 0 && G1.prev_length < max_lazy_match in deflate()
1832 && G1.strstart - hash_head <= MAX_DIST in deflate()
1840 if (match_length > G1.lookahead) in deflate()
1841 match_length = G1.lookahead; in deflate()
1844 if (match_length == MIN_MATCH && G1.strstart - G1.match_start > TOO_FAR) { in deflate()
1854 if (G1.prev_length >= MIN_MATCH && match_length <= G1.prev_length) { in deflate()
1855 check_match(G1.strstart - 1, prev_match, G1.prev_length); in deflate()
1856 flush = ct_tally(G1.strstart - 1 - prev_match, G1.prev_length - MIN_MATCH); in deflate()
1861 G1.lookahead -= G1.prev_length - 1; in deflate()
1862 G1.prev_length -= 2; in deflate()
1864 G1.strstart++; in deflate()
1865 INSERT_STRING(G1.strstart, hash_head); in deflate()
1871 } while (--G1.prev_length != 0); in deflate()
1874 G1.strstart++; in deflate()
1877 G1.block_start = G1.strstart; in deflate()
1884 Tracevv((stderr, "%c", G1.window[G1.strstart - 1])); in deflate()
1885 if (ct_tally(0, G1.window[G1.strstart - 1])) { in deflate()
1887 G1.block_start = G1.strstart; in deflate()
1889 G1.strstart++; in deflate()
1890 G1.lookahead--; in deflate()
1896 G1.strstart++; in deflate()
1897 G1.lookahead--; in deflate()
1899 Assert(G1.strstart <= G1.isize && G1.lookahead <= G1.isize, "a bit too far"); in deflate()
1909 ct_tally(0, G1.window[G1.strstart - 1]); in deflate()
1940 G1.lookahead = file_read(G1.window, in lm_init()
1943 if (G1.lookahead == 0 || G1.lookahead == (unsigned) -1) { in lm_init()
1944 G1.eofile = 1; in lm_init()
1945 G1.lookahead = 0; in lm_init()
1957 UPDATE_HASH(G1.ins_h, G1.window[j]); in lm_init()
2078 G1.crc = ~0; in zip()
2099 put_32bit(~G1.crc); in zip()
2100 put_32bit(G1.isize); in zip()
2110 memset(&G1.crc, 0, (sizeof(G1) - offsetof(struct globals, crc)) + sizeof(G2)); in IF_DESKTOP()
2247 ALLOC(uch, G1.l_buf, INBUFSIZ); in gzip_main()
2248 ALLOC(uch, G1.outbuf, OUTBUFSIZ); in gzip_main()
2249 ALLOC(ush, G1.d_buf, DIST_BUFSIZE); in gzip_main()
2250 ALLOC(uch, G1.window, 2L * WSIZE); in gzip_main()
2251 ALLOC(ush, G1.prev, 1L << BITS); in gzip_main()