Lines Matching refs:strstart
245 * Updates strstart and lookahead.
248 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
261 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
265 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
270 * strstart == 0 && lookahead == 1 (input done a byte at time)
279 if (s->strstart >= wsize + MAX_DIST(s)) {
283 s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
285 if (s->insert > s->strstart)
286 s->insert = s->strstart;
293 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
294 * more == window_size - lookahead - strstart
299 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
305 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
310 uInt str = s->strstart - s->insert;
339 * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
342 ulg curr = s->strstart + (ulg)(s->lookahead);
368 Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
576 s->strstart = 0;
591 str = s->strstart;
601 s->strstart = str;
605 s->strstart += s->lookahead;
606 s->block_start = (long)s->strstart;
626 len = s->strstart + s->lookahead;
630 zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
687 s->strstart = 0;
777 if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
862 wraplen = 6 + (s->strstart ? 4 : 0);
1012 if (s->strstart != 0) header |= PRESET_DICT;
1018 if (s->strstart != 0) {
1216 s->strstart = 0;
1347 * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
1352 register Bytef *scan = s->window + s->strstart; /* current string */
1357 IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
1358 s->strstart - (IPos)MAX_DIST(s) : NIL;
1369 register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1373 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1392 Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
1396 Assert(cur_match < s->strstart, "no future");
1417 * strstart + 3, + 5, up to strstart + 257. We check for insufficient
1419 * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is
1433 /* Here, scan <= window + strstart + 257 */
1458 * the 256th check will be made at strstart + 258.
1499 register Bytef *scan = s->window + s->strstart; /* current string */
1502 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1509 Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
1512 Assert(cur_match < s->strstart, "no future");
1530 * the 256th check will be made at strstart + 258.
1589 * IN assertion: strstart is set to the end of the current match.
1595 (ulg)((long)s->strstart - s->block_start), \
1597 s->block_start = s->strstart; \
1653 left = s->strstart - s->block_start; /* bytes left in window */
1722 * therefore s->block_start == s->strstart.
1727 s->strstart
1728 s->insert = s->strstart;
1731 if (s->window_size - s->strstart <= used) {
1733 s->strstart -= s->w_size;
1734 zmemcpy(s->window, s->window + s->w_size, s->strstart);
1737 if (s->insert > s->strstart)
1738 s->insert = s->strstart;
1740 zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);
1741 s->strstart += used;
1744 s->block_start = s->strstart;
1746 if (s->high_water < s->strstart)
1747 s->high_water = s->strstart;
1755 s->strm->avail_in == 0 && (long)s->strstart == s->block_start)
1759 have = s->window_size - s->strstart;
1763 s->strstart -= s->w_size;
1764 zmemcpy(s->window, s->window + s->w_size, s->strstart);
1768 if (s->insert > s->strstart)
1769 s->insert = s->strstart;
1774 read_buf(s->strm, s->window + s->strstart, have);
1775 s->strstart += have;
1778 if (s->high_water < s->strstart)
1779 s->high_water = s->strstart;
1790 left = s->strstart - s->block_start;
1831 /* Insert the string window[strstart .. strstart + 2] in the
1836 INSERT_STRING(s, s->strstart, hash_head);
1842 if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
1851 check_match(s, s->strstart, s->match_start, s->match_length);
1853 _tr_tally_dist(s, s->strstart - s->match_start,
1864 s->match_length--; /* string at strstart already in table */
1866 s->strstart++;
1867 INSERT_STRING(s, s->strstart, hash_head);
1868 /* strstart never exceeds WSIZE-MAX_MATCH, so there are
1872 s->strstart++;
1876 s->strstart += s->match_length;
1878 s->ins_h = s->window[s->strstart];
1879 UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]);
1889 Tracevv((stderr,"%c", s->window[s->strstart]));
1890 _tr_tally_lit(s, s->window[s->strstart], bflush);
1892 s->strstart++;
1896 s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
1931 /* Insert the string window[strstart .. strstart + 2] in the
1936 INSERT_STRING(s, s->strstart, hash_head);
1945 s->strstart - hash_head <= MAX_DIST(s)) {
1956 s->strstart - s->match_start > TOO_FAR)
1970 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1973 check_match(s, s->strstart - 1, s->prev_match, s->prev_length);
1975 _tr_tally_dist(s, s->strstart - 1 - s->prev_match,
1979 * strstart - 1 and strstart are already inserted. If there is not
1986 if (++s->strstart <= max_insert) {
1987 INSERT_STRING(s, s->strstart, hash_head);
1992 s->strstart++;
2001 Tracevv((stderr,"%c", s->window[s->strstart - 1]));
2002 _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
2006 s->strstart++;
2014 s->strstart++;
2020 Tracevv((stderr,"%c", s->window[s->strstart - 1]));
2021 _tr_tally_lit(s, s->window[s->strstart - 1], bflush);
2024 s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
2060 if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
2061 scan = s->window + s->strstart - 1;
2064 strend = s->window + s->strstart + MAX_MATCH;
2081 check_match(s, s->strstart, s->strstart - 1, s->match_length);
2086 s->strstart += s->match_length;
2090 Tracevv((stderr,"%c", s->window[s->strstart]));
2091 _tr_tally_lit(s, s->window[s->strstart], bflush);
2093 s->strstart++;
2127 Tracevv((stderr,"%c", s->window[s->strstart]));
2128 _tr_tally_lit(s, s->window[s->strstart], bflush);
2130 s->strstart++;