Lines Matching refs:lookahead

138 /* Minimum amount of lookahead, except at the end of the input file.
368 * s->lookahead stays null, so s->ins_h will be recomputed at the next
810 if (strm->avail_in != 0 || s->lookahead != 0 ||
1026 s->lookahead = 0;
1045 * OUT assertion: the match length is not greater than s->lookahead.
1094 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1096 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1104 * for insufficient lookahead only occur occasionally for performance
1107 * However the length of the match is limited to the lookahead, so
1121 * lookahead only every 4th comparison; the 128th check will be made
1124 * to check more often for insufficient lookahead.
1159 /* We check for insufficient lookahead only every 8th comparison;
1190 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1191 return s->lookahead;
1213 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1232 /* We check for insufficient lookahead only every 8th comparison;
1249 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1281 * Fill the window when the lookahead becomes insufficient.
1282 * Updates strstart and lookahead.
1284 * IN assertion: lookahead < MIN_LOOKAHEAD
1299 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1303 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1308 * strstart == 0 && lookahead == 1 (input done a byte at time)
1314 /* If the window is almost full and there is insufficient lookahead,
1354 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1355 * more == window_size - lookahead - strstart
1360 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1366 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1367 s->lookahead += n;
1370 if (s->lookahead >= MIN_MATCH) {
1381 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1431 if (s->lookahead <= 1) {
1437 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1439 if (s->lookahead == 0) break; /* flush the current block */
1443 s->strstart += s->lookahead;
1444 s->lookahead = 0;
1450 s->lookahead = (uInt)(s->strstart - max_start);
1480 /* Make sure that we always have enough lookahead, except
1485 if (s->lookahead < MIN_LOOKAHEAD) {
1487 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1490 if (s->lookahead == 0) break; /* flush the current block */
1496 if (s->lookahead >= MIN_MATCH) {
1528 s->lookahead -= s->match_length;
1535 s->lookahead >= MIN_MATCH) {
1555 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1563 s->lookahead--;
1587 /* Make sure that we always have enough lookahead, except
1592 if (s->lookahead < MIN_LOOKAHEAD) {
1594 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1597 if (s->lookahead == 0) break; /* flush the current block */
1603 if (s->lookahead >= MIN_MATCH) {
1642 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1652 * enough lookahead, the last two strings are not inserted in
1655 s->lookahead -= s->prev_length-1;
1679 s->lookahead--;
1687 s->lookahead--;
1718 /* Make sure that we always have enough lookahead, except
1722 if (s->lookahead < MAX_MATCH) {
1724 if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
1727 if (s->lookahead == 0) break; /* flush the current block */
1733 max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
1746 s->lookahead -= run;
1752 s->lookahead--;