Lines Matching refs:strstart

369     s->strstart = length;
666 if (s->strstart != 0) header |= PRESET_DICT;
673 if (s->strstart != 0) {
1029 s->strstart = 0;
1049 * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
1061 register Bytef *scan = s->window + s->strstart; /* current string */
1066 IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
1067 s->strstart - (IPos)MAX_DIST(s) : NIL;
1078 register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1082 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1101 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1104 Assert(cur_match < s->strstart, "no future");
1125 * strstart+3, +5, ... up to strstart+257. We check for insufficient
1127 * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
1141 /* Here, scan <= window+strstart+257 */
1165 * the 256th check will be made at strstart+258.
1208 register Bytef *scan = s->window + s->strstart; /* current string */
1211 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1218 Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
1220 Assert(cur_match < s->strstart, "no future");
1238 * the 256th check will be made at strstart+258.
1287 * Updates strstart and lookahead.
1290 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
1304 more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
1308 if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
1313 * strstart == 0 && lookahead == 1 (input done a byte at time)
1322 if (s->strstart >= wsize+MAX_DIST(s)) {
1326 s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
1359 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
1360 * more == window_size - lookahead - strstart
1365 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
1371 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1376 s->ins_h = s->window[s->strstart];
1377 UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
1391 * IN assertion: strstart is set to the end of the current match.
1397 (ulg)((long)s->strstart - s->block_start), \
1399 s->block_start = s->strstart; \
1438 Assert(s->strstart < s->w_size+MAX_DIST(s) ||
1448 s->strstart += s->lookahead;
1453 if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
1454 /* strstart == 0 is possible when wraparound on 16-bit machine */
1455 s->lookahead = (uInt)(s->strstart - max_start);
1456 s->strstart = (uInt)max_start;
1462 if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
1498 /* Insert the string window[strstart .. strstart+2] in the
1502 INSERT_STRING(s, s->strstart, hash_head);
1508 if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
1515 (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
1521 } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
1528 check_match(s, s->strstart, s->match_start, s->match_length);
1530 _tr_tally_dist(s, s->strstart - s->match_start,
1541 s->match_length--; /* string at strstart already in table */
1543 s->strstart++;
1544 INSERT_STRING(s, s->strstart, hash_head);
1545 /* strstart never exceeds WSIZE-MAX_MATCH, so there are
1549 s->strstart++;
1553 s->strstart += s->match_length;
1555 s->ins_h = s->window[s->strstart];
1556 UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
1566 Tracevv((stderr,"%c", s->window[s->strstart]));
1567 _tr_tally_lit (s, s->window[s->strstart], bflush);
1569 s->strstart++;
1605 /* Insert the string window[strstart .. strstart+2] in the
1609 INSERT_STRING(s, s->strstart, hash_head);
1618 s->strstart - hash_head <= MAX_DIST(s)) {
1625 } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
1633 s->strstart - s->match_start > TOO_FAR)
1647 uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
1650 check_match(s, s->strstart-1, s->prev_match, s->prev_length);
1652 _tr_tally_dist(s, s->strstart -1 - s->prev_match,
1656 * strstart-1 and strstart are already inserted. If there is not
1663 if (++s->strstart <= max_insert) {
1664 INSERT_STRING(s, s->strstart, hash_head);
1669 s->strstart++;
1678 Tracevv((stderr,"%c", s->window[s->strstart-1]));
1679 _tr_tally_lit(s, s->window[s->strstart-1], bflush);
1683 s->strstart++;
1691 s->strstart++;
1697 Tracevv((stderr,"%c", s->window[s->strstart-1]));
1698 _tr_tally_lit(s, s->window[s->strstart-1], bflush);
1737 if (s->strstart > 0) { /* if there is a previous byte, that is */
1739 scan = s->window + s->strstart - 1;
1749 check_match(s, s->strstart, s->strstart - 1, run);
1752 s->strstart += run;
1755 Tracevv((stderr,"%c", s->window[s->strstart]));
1756 _tr_tally_lit (s, s->window[s->strstart], bflush);
1758 s->strstart++;