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 ||
540 s->lookahead = 0;
553 * OUT assertion: the match length is not greater than s->lookahead.
602 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
604 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
624 * lookahead only every 4th comparison; the 128th check will be made
627 * to check more often for insufficient lookahead.
662 /* We check for insufficient lookahead only every 8th comparison;
693 if ((uInt)best_len <= s->lookahead) return best_len;
694 return s->lookahead;
728 * Fill the window when the lookahead becomes insufficient.
729 * Updates strstart and lookahead.
731 * IN assertion: lookahead < MIN_LOOKAHEAD
747 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
750 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
755 * and lookahead == 1 (input done one byte at time)
759 /* If the window is almost full and there is insufficient lookahead,
797 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
798 * more == window_size - lookahead - strstart
803 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
809 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
810 s->lookahead += n;
813 if (s->lookahead >= MIN_MATCH) {
824 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
875 if (s->lookahead <= 1) {
881 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
883 if (s->lookahead == 0) break; /* flush the current block */
887 s->strstart += s->lookahead;
888 s->lookahead = 0;
894 s->lookahead = (uInt)(s->strstart - max_start);
925 /* Make sure that we always have enough lookahead, except
930 if (s->lookahead < MIN_LOOKAHEAD) {
932 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
935 if (s->lookahead == 0) break; /* flush the current block */
941 if (s->lookahead >= MIN_MATCH) {
964 s->lookahead -= s->match_length;
970 s->lookahead >= MIN_MATCH) {
988 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
996 s->lookahead--;
1020 /* Make sure that we always have enough lookahead, except
1025 if (s->lookahead < MIN_LOOKAHEAD) {
1027 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1030 if (s->lookahead == 0) break; /* flush the current block */
1036 if (s->lookahead >= MIN_MATCH) {
1070 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1080 * enough lookahead, the last two strings are not inserted in
1083 s->lookahead -= s->prev_length-1;
1106 s->lookahead--;
1114 s->lookahead--;