Lines Matching refs:lookahead

99 /* Minimum amount of lookahead, except at the end of the input file.
405 if (strm->avail_in != 0 || s->lookahead != 0 ||
547 s->lookahead = 0;
560 * OUT assertion: the match length is not greater than s->lookahead.
609 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
611 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
631 * lookahead only every 4th comparison; the 128th check will be made
634 * to check more often for insufficient lookahead.
669 /* We check for insufficient lookahead only every 8th comparison;
700 if ((uInt)best_len <= s->lookahead) return best_len;
701 return s->lookahead;
735 * Fill the window when the lookahead becomes insufficient.
736 * Updates strstart and lookahead.
738 * IN assertion: lookahead < MIN_LOOKAHEAD
754 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
757 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
762 * and lookahead == 1 (input done one byte at time)
766 /* If the window is almost full and there is insufficient lookahead,
804 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
805 * more == window_size - lookahead - strstart
810 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
816 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
817 s->lookahead += n;
820 if (s->lookahead >= MIN_MATCH) {
831 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
882 if (s->lookahead <= 1) {
888 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
890 if (s->lookahead == 0) break; /* flush the current block */
894 s->strstart += s->lookahead;
895 s->lookahead = 0;
901 s->lookahead = (uInt)(s->strstart - max_start);
932 /* Make sure that we always have enough lookahead, except
937 if (s->lookahead < MIN_LOOKAHEAD) {
939 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
942 if (s->lookahead == 0) break; /* flush the current block */
948 if (s->lookahead >= MIN_MATCH) {
971 s->lookahead -= s->match_length;
977 s->lookahead >= MIN_MATCH) {
995 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1003 s->lookahead--;
1027 /* Make sure that we always have enough lookahead, except
1032 if (s->lookahead < MIN_LOOKAHEAD) {
1034 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1037 if (s->lookahead == 0) break; /* flush the current block */
1043 if (s->lookahead >= MIN_MATCH) {
1077 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1087 * enough lookahead, the last two strings are not inserted in
1090 s->lookahead -= s->prev_length-1;
1113 s->lookahead--;
1121 s->lookahead--;