Home | History | Annotate | Download | only in zlib

Lines Matching full:lookahead

340      * s->lookahead stays null, so s->ins_h will be recomputed at the next
816 if (strm->avail_in != 0 || s->lookahead != 0 ||
850 if (s->lookahead == 0) {
1038 s->lookahead = 0;
1057 * OUT assertion: the match length is not greater than s->lookahead.
1106 if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
1108 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1116 * for insufficient lookahead only occur occasionally for performance
1119 * However the length of the match is limited to the lookahead, so
1133 * lookahead only every 4th comparison; the 128th check will be made
1136 * to check more often for insufficient lookahead.
1171 /* We check for insufficient lookahead only every 8th comparison;
1202 if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
1203 return s->lookahead;
1226 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1245 /* We check for insufficient lookahead only every 8th comparison;
1262 return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
1296 * Fill the window when the lookahead becomes insufficient.
1297 * Updates strstart and lookahead.
1299 * IN assertion: lookahead < MIN_LOOKAHEAD
1314 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1318 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1323 * strstart == 0 && lookahead == 1 (input done a byte at time)
1329 /* If the window is almost full and there is insufficient lookahead,
1368 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1369 * more == window_size - lookahead - strstart
1374 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1380 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1381 s->lookahead += n;
1384 if (s->lookahead >= MIN_MATCH) {
1395 } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
1402 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
1405 ulg curr = s->strstart + (ulg)(s->lookahead);
1479 if (s->lookahead <= 1) {
1485 if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
1487 if (s->lookahead == 0) break; /* flush the current block */
1491 s->strstart += s->lookahead;
1492 s->lookahead = 0;
1498 s->lookahead = (uInt)(s->strstart - max_start);
1528 /* Make sure that we always have enough lookahead, except
1533 if (s->lookahead < MIN_LOOKAHEAD) {
1535 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1538 if (s->lookahead == 0) break; /* flush the current block */
1545 if (s->lookahead >= MIN_MATCH) {
1566 s->lookahead -= s->match_length;
1573 s->lookahead >= MIN_MATCH) {
1593 /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
1601 s->lookahead--;
1625 /* Make sure that we always have enough lookahead, except
1630 if (s->lookahead < MIN_LOOKAHEAD) {
1632 if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
1635 if (s->lookahead == 0) break; /* flush the current block */
1642 if (s->lookahead >= MIN_MATCH) {
1677 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1687 * enough lookahead, the last two strings are not inserted in
1690 s->lookahead -= s->prev_length-1;
1714 s->lookahead--;
1722 s->lookahead--;
1750 /* Make sure that we always have enough lookahead, except
1754 if (s->lookahead < MAX_MATCH) {
1756 if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
1759 if (s->lookahead == 0) break; /* flush the current block */
1764 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
1776 if (s->match_length > s->lookahead)
1777 s->match_length = s->lookahead;
1787 s->lookahead -= s->match_length;
1794 s->lookahead--;
1815 if (s->lookahead == 0) {
1817 if (s->lookahead == 0) {
1828 s->lookahead--;