Home | History | Annotate | Download | only in zlib

Lines Matching refs:lookahead

344      * s->lookahead stays null, so s->ins_h will be recomputed at the next
822 if (strm->avail_in != 0 || s->lookahead != 0 ||
873 if (s->lookahead == 0) {
1062 s->lookahead = 0;
1132 * OUT assertion: the match length is not greater than s->lookahead.
1182 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1184 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1195 * for insufficient lookahead only occur occasionally for performance
1198 * However the length of the match is limited to the lookahead, so
1212 * lookahead only every 4th comparison; the 128th check will be made
1215 * to check more often for insufficient lookahead.
1253 /* We check for insufficient lookahead only every 8th comparison;
1291 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1292 return s->lookahead;
1325 len <= s->lookahead) {
1369 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1388 /* We check for insufficient lookahead only every 8th comparison;
1405 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1439 * Fill the window when the lookahead becomes insufficient.
1440 * Updates strstart and lookahead.
1442 * IN assertion: lookahead < MIN_LOOKAHEAD
1457 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1461 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1466 * strstart == 0 && lookahead == 1 (input done a byte at time)
1472 /* If the window is almost full and there is insufficient lookahead,
1526 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1527 * more == window_size - lookahead - strstart
1532 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1538 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1540 class_set(s, s->strstart + s->lookahead, n, s->strm->clas);
1542 s->lookahead += n;
1545 if (s->lookahead >= MIN_MATCH) {
1556 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1563 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
1566 ulg curr = s->strstart + (ulg)(s->lookahead);
1641 if (s->lookahead <= 1) {
1647 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1649 if (s->lookahead == 0) break; /* flush the current block */
1653 s->strstart += s->lookahead;
1654 s->lookahead = 0;
1660 s->lookahead = (uInt)(s->strstart - max_start);
1696 /* Make sure that we always have enough lookahead, except
1701 if (s->lookahead < MIN_LOOKAHEAD) {
1703 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1706 if (s->lookahead == 0) break; /* flush the current block */
1713 if (s->lookahead >= MIN_MATCH) {
1734 s->lookahead -= s->match_length;
1741 s->lookahead >= MIN_MATCH) {
1761 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1769 s->lookahead--;
1796 if (s->lookahead) {
1806 lookahead, except
1811 if (s->lookahead < MIN_LOOKAHEAD) {
1813 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1816 if (s->lookahead == 0) break; /* flush the current block */
1823 if (s->lookahead >= MIN_MATCH) {
1876 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1886 * enough lookahead, the last two strings are not inserted in
1889 s->lookahead -= s->prev_length-1;
1913 s->lookahead--;
1921 s->lookahead--;
1949 /* Make sure that we always have enough lookahead, except
1953 if (s->lookahead < MAX_MATCH) {
1955 if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
1958 if (s->lookahead == 0) break; /* flush the current block */
1963 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
1975 if (s->match_length > s->lookahead)
1976 s->match_length = s->lookahead;
1986 s->lookahead -= s->match_length;
1993 s->lookahead--;
2014 if (s->lookahead == 0) {
2016 if (s->lookahead == 0) {
2027 s->lookahead--;