Lines Matching refs:lookahead

141 /* Minimum amount of lookahead, except at the end of the input file.
373 * s->lookahead stays null, so s->ins_h will be recomputed at the next
815 if (strm->avail_in != 0 || s->lookahead != 0 ||
1031 s->lookahead = 0;
1050 * OUT assertion: the match length is not greater than s->lookahead.
1099 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1101 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1109 * for insufficient lookahead only occur occasionally for performance
1112 * However the length of the match is limited to the lookahead, so
1126 * lookahead only every 4th comparison; the 128th check will be made
1129 * to check more often for insufficient lookahead.
1164 /* We check for insufficient lookahead only every 8th comparison;
1195 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1196 return s->lookahead;
1218 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1237 /* We check for insufficient lookahead only every 8th comparison;
1254 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1286 * Fill the window when the lookahead becomes insufficient.
1287 * Updates strstart and lookahead.
1289 * IN assertion: lookahead < MIN_LOOKAHEAD
1304 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1308 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1313 * strstart == 0 && lookahead == 1 (input done a byte at time)
1319 /* If the window is almost full and there is insufficient lookahead,
1359 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1360 * more == window_size - lookahead - strstart
1365 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1371 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1372 s->lookahead += n;
1375 if (s->lookahead >= MIN_MATCH) {
1386 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1436 if (s->lookahead <= 1) {
1442 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1444 if (s->lookahead == 0) break; /* flush the current block */
1448 s->strstart += s->lookahead;
1449 s->lookahead = 0;
1455 s->lookahead = (uInt)(s->strstart - max_start);
1485 /* Make sure that we always have enough lookahead, except
1490 if (s->lookahead < MIN_LOOKAHEAD) {
1492 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1495 if (s->lookahead == 0) break; /* flush the current block */
1501 if (s->lookahead >= MIN_MATCH) {
1533 s->lookahead -= s->match_length;
1540 s->lookahead >= MIN_MATCH) {
1560 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1568 s->lookahead--;
1592 /* Make sure that we always have enough lookahead, except
1597 if (s->lookahead < MIN_LOOKAHEAD) {
1599 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1602 if (s->lookahead == 0) break; /* flush the current block */
1608 if (s->lookahead >= MIN_MATCH) {
1647 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1657 * enough lookahead, the last two strings are not inserted in
1660 s->lookahead -= s->prev_length-1;
1684 s->lookahead--;
1692 s->lookahead--;
1723 /* Make sure that we always have enough lookahead, except
1727 if (s->lookahead < MAX_MATCH) {
1729 if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
1732 if (s->lookahead == 0) break; /* flush the current block */
1738 max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
1751 s->lookahead -= run;
1757 s->lookahead--;