Lines Matching refs:lookahead
377 * s->lookahead stays null, so s->ins_h will be recomputed at the next
865 if (strm->avail_in != 0 || s->lookahead != 0 ||
899 if (s->lookahead == 0) {
1084 s->lookahead = 0;
1103 * OUT assertion: the match length is not greater than s->lookahead.
1152 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1154 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1162 * for insufficient lookahead only occur occasionally for performance
1165 * However the length of the match is limited to the lookahead, so
1179 * lookahead only every 4th comparison; the 128th check will be made
1182 * to check more often for insufficient lookahead.
1217 /* We check for insufficient lookahead only every 8th comparison;
1248 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1249 return s->lookahead;
1272 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1291 /* We check for insufficient lookahead only every 8th comparison;
1308 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1342 * Fill the window when the lookahead becomes insufficient.
1343 * Updates strstart and lookahead.
1345 * IN assertion: lookahead < MIN_LOOKAHEAD
1360 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1364 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1369 * strstart == 0 && lookahead == 1 (input done a byte at time)
1375 /* If the window is almost full and there is insufficient lookahead,
1414 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1415 * more == window_size - lookahead - strstart
1420 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1426 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1427 s->lookahead += n;
1430 if (s->lookahead >= MIN_MATCH) {
1441 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1448 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
1451 ulg curr = s->strstart + (ulg)(s->lookahead);
1525 if (s->lookahead <= 1) {
1531 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1533 if (s->lookahead == 0) break; /* flush the current block */
1537 s->strstart += s->lookahead;
1538 s->lookahead = 0;
1544 s->lookahead = (uInt)(s->strstart - max_start);
1574 /* Make sure that we always have enough lookahead, except
1579 if (s->lookahead < MIN_LOOKAHEAD) {
1581 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1584 if (s->lookahead == 0) break; /* flush the current block */
1591 if (s->lookahead >= MIN_MATCH) {
1612 s->lookahead -= s->match_length;
1619 s->lookahead >= MIN_MATCH) {
1639 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1647 s->lookahead--;
1677 /* Make sure that we always have enough lookahead, except
1682 if (s->lookahead < MIN_LOOKAHEAD) {
1684 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1687 if (s->lookahead == 0) break; /* flush the current block */
1694 if (s->lookahead >= MIN_MATCH) {
1729 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1739 * enough lookahead, the last two strings are not inserted in
1742 s->lookahead -= s->prev_length-1;
1766 s->lookahead--;
1774 s->lookahead--;
1808 /* Make sure that we always have enough lookahead, except
1812 if (s->lookahead < MAX_MATCH) {
1814 if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
1817 if (s->lookahead == 0) break; /* flush the current block */
1822 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
1834 if (s->match_length > s->lookahead)
1835 s->match_length = s->lookahead;
1845 s->lookahead -= s->match_length;
1852 s->lookahead--;
1879 if (s->lookahead == 0) {
1881 if (s->lookahead == 0) {
1892 s->lookahead--;