Lines Matching full:lookahead
391 if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
417 while (s->lookahead >= MIN_MATCH) {
419 n = s->lookahead - (MIN_MATCH-1);
429 s->lookahead = MIN_MATCH-1;
432 s->strstart += s->lookahead;
434 s->insert = s->lookahead;
435 s->lookahead = 0;
456 lookahead;
460 zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
996 if (strm->avail_in != 0 || s->lookahead != 0 ||
1031 if (s->lookahead == 0) {
1210 s->lookahead = 0;
1230 * OUT assertion: the match length is not greater than s->lookahead.
1279 if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead;
1281 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1289 * for insufficient lookahead only occur occasionally for performance
1292 * However the length of the match is limited to the lookahead, so
1306 * lookahead only every 4th comparison; the 128th check will be made
1309 * to check more often for insufficient lookahead.
1344 /* We check for insufficient lookahead only every 8th comparison;
1375 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1376 return s->lookahead;
1399 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1418 /* We check for insufficient lookahead only every 8th comparison;
1435 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1473 * Fill the window when the lookahead becomes insufficient.
1474 * Updates strstart and lookahead.
1476 * IN assertion: lookahead < MIN_LOOKAHEAD
1489 Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
1492 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1496 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1501 * strstart == 0 && lookahead == 1 (input done a byte at time)
1507 /* If the window is almost full and there is insufficient lookahead,
1522 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1523 * more == window_size - lookahead - strstart
1528 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1534 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1535 s->lookahead += n;
1538 if (s->lookahead + s->insert >= MIN_MATCH) {
1553 if (s->lookahead + s->insert < MIN_MATCH)
1561 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1568 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
1571 ulg curr = s->strstart + (ulg)(s->lookahead);
1832 /* Make sure that we always have enough lookahead, except
1837 if (s->lookahead < MIN_LOOKAHEAD) {
1839 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1842 if (s->lookahead == 0) break; /* flush the current block */
1849 if (s->lookahead >= MIN_MATCH) {
1870 s->lookahead -= s->match_length;
1877 s->lookahead >= MIN_MATCH) {
1897 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1905 s->lookahead--;
1935 /* Make sure that we always have enough lookahead, except
1940 if (s->lookahead < MIN_LOOKAHEAD) {
1942 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1945 if (s->lookahead == 0) break; /* flush the current block */
1952 if (s->lookahead >= MIN_MATCH) {
1987 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1997 * enough lookahead, the last two strings are not inserted in
2000 s->lookahead -= s->prev_length-1;
2024 s->lookahead--;
2032 s->lookahead--;
2066 /* Make sure that we always have enough lookahead, except
2070 if (s->lookahead <= MAX_MATCH) {
2072 if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
2075 if (s->lookahead == 0) break; /* flush the current block */
2080 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
2092 if (s->match_length > s->lookahead)
2093 s->match_length = s->lookahead;
2104 s->lookahead -= s->match_length;
2111 s->lookahead--;
2138 if (s->lookahead == 0) {
2140 if (s->lookahead == 0) {
2151 s->lookahead--;