Lines Matching refs:lookahead

338     if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
364 while (s->lookahead >= MIN_MATCH) {
366 n = s->lookahead - (MIN_MATCH-1);
376 s->lookahead = MIN_MATCH-1;
379 s->strstart += s->lookahead;
381 s->insert = s->lookahead;
382 s->lookahead = 0;
897 if (strm->avail_in != 0 || s->lookahead != 0 ||
931 if (s->lookahead == 0) {
1120 s->lookahead = 0;
1140 * OUT assertion: the match length is not greater than s->lookahead.
1189 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1191 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1199 * for insufficient lookahead only occur occasionally for performance
1202 * However the length of the match is limited to the lookahead, so
1216 * lookahead only every 4th comparison; the 128th check will be made
1219 * to check more often for insufficient lookahead.
1254 /* We check for insufficient lookahead only every 8th comparison;
1285 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1286 return s->lookahead;
1309 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1328 /* We check for insufficient lookahead only every 8th comparison;
1345 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1379 * Fill the window when the lookahead becomes insufficient.
1380 * Updates strstart and lookahead.
1382 * IN assertion: lookahead < MIN_LOOKAHEAD
1396 Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
1399 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1403 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1408 * strstart == 0 && lookahead == 1 (input done a byte at time)
1414 /* If the window is almost full and there is insufficient lookahead,
1453 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1454 * more == window_size - lookahead - strstart
1459 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1465 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1466 s->lookahead += n;
1469 if (s->lookahead + s->insert >= MIN_MATCH) {
1484 if (s->lookahead + s->insert < MIN_MATCH)
1492 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1499 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
1502 ulg curr = s->strstart + (ulg)(s->lookahead);
1579 if (s->lookahead <= 1) {
1585 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1587 if (s->lookahead == 0) break; /* flush the current block */
1591 s->strstart += s->lookahead;
1592 s->lookahead = 0;
1598 s->lookahead = (uInt)(s->strstart - max_start);
1634 /* Make sure that we always have enough lookahead, except
1639 if (s->lookahead < MIN_LOOKAHEAD) {
1641 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1644 if (s->lookahead == 0) break; /* flush the current block */
1651 if (s->lookahead >= MIN_MATCH) {
1672 s->lookahead -= s->match_length;
1679 s->lookahead >= MIN_MATCH) {
1699 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1707 s->lookahead--;
1737 /* Make sure that we always have enough lookahead, except
1742 if (s->lookahead < MIN_LOOKAHEAD) {
1744 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1747 if (s->lookahead == 0) break; /* flush the current block */
1754 if (s->lookahead >= MIN_MATCH) {
1789 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1799 * enough lookahead, the last two strings are not inserted in
1802 s->lookahead -= s->prev_length-1;
1826 s->lookahead--;
1834 s->lookahead--;
1868 /* Make sure that we always have enough lookahead, except
1872 if (s->lookahead <= MAX_MATCH) {
1874 if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
1877 if (s->lookahead == 0) break; /* flush the current block */
1882 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
1894 if (s->match_length > s->lookahead)
1895 s->match_length = s->lookahead;
1906 s->lookahead -= s->match_length;
1913 s->lookahead--;
1940 if (s->lookahead == 0) {
1942 if (s->lookahead == 0) {
1953 s->lookahead--;