Lines Matching defs:window

358  * A Pos is an index in the character window. We use short instead of
378 uInt w_size; /* LZ77 window size (32K by default) */
382 Bytef *window;
384 * Sliding window. Input bytes are read into the second half
385 * of the window, and move to the first half later to keep a
389 * multiple of the block size. Also, it limits the window size
391 * user input buffer as sliding window.
396 * Actual size of window: 2*wSize, except when the user input
397 * buffer is directly used as sliding window.
405 * window index modulo 32K.
426 * block. Gets negative when the window is moved backwards.
434 uInt lookahead; /* number of valid bytes ahead in window */
511 * all input data is still in the window so we can still
645 * sliding window trailing behind the input currently being processed).
816 (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
821 (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
846 /* To do: ignore strm->next_in if we use it as window */
918 s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof (Byte));
928 if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
976 zmemcpy(s->window, dictionary, length);
985 s->ins_h = s->window[0];
986 UPDATE_HASH(s, s->ins_h, s->window[1]);
1291 TRY_FREE(strm, s->window);
1330 ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof (Byte));
1336 if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
1343 zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof (Byte));
1459 register Bytef *scan = s->window + s->strstart; /* current string */
1468 * we prevent matches with the string of window index 0.
1478 register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
1482 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1509 match = s->window + cur_match;
1534 * end of the window, or to check more often for
1547 /* Here, scan <= window+strstart+257 */
1548 Assert(scan <= s->window+(unsigned)(s->window_size-1),
1586 Assert(scan <= s->window+(unsigned)(s->window_size-1),
1622 register Bytef *scan = s->window + s->strstart; /* current string */
1625 register Bytef *strend = s->window + s->strstart + MAX_MATCH;
1639 match = s->window + cur_match;
1666 Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
1691 if (zmemcmp(s->window + match, s->window + start, length) != EQUAL) {
1695 fprintf(stderr, "%c%c", s->window[match++],
1696 s->window[start++]);
1702 do { putc(s->window[start++], stderr); } while (--length != 0);
1711 * Fill the window when the lookahead becomes insufficient.
1726 unsigned more; /* Amount of free space at the end of the window. */
1746 * If the window is almost full and there is
1754 zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
1815 n = read_buf(s->strm, s->window + s->strstart + s->lookahead,
1821 s->ins_h = s->window[s->strstart];
1822 UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
1843 (charf *)&s->window[(unsigned)s->block_start] : \
1867 * window to pending_buf.
1888 /* Fill the window as much as possible: */
1966 * Insert the string window[strstart .. strstart+2] in
1983 * with the string of window index 0 (in
2029 s->ins_h = s->window[s->strstart];
2031 s->window[s->strstart+1]);
2044 Tracevv((stderr, "%c", s->window[s->strstart]));
2045 _tr_tally_lit(s, s->window[s->strstart], bflush);
2059 * no better match at the next window position.
2090 * Insert the string window[strstart .. strstart+2] in
2110 * with the string of window index 0 (in
2179 Tracevv((stderr, "%c", s->window[s->strstart-1]));
2180 _tr_tally_lit(s, s->window[s->strstart-1], bflush);
2200 Tracevv((stderr, "%c", s->window[s->strstart-1]));
2201 _tr_tally_lit(s, s->window[s->strstart-1], bflush);
3555 uInt w)); /* window size */
3626 uInt wbits; /* log2(window size) (8..15, defaults to 15) */
3700 /* set window size */
3767 z->msg = "invalid window size";
4157 DRY, /* output remaining window bytes */
4188 Bytef *window; /* sliding window */
4189 Bytef *end; /* one byte after sliding window */
4190 Bytef *read; /* window read pointer */
4191 Bytef *write; /* window write pointer */
4215 #define WWRAP {if (q == s->end && s->read != s->window) {q = s->window; \
4227 /* copy as much as possible from the sliding window to the output area */
4314 s->read = s->write = s->window;
4336 if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
4342 s->end = s->window + w;
4362 Bytef *q; /* output window write pointer */
4363 uInt m; /* bytes to end of window or read pointer */
4451 (s->end - s->read) + (q - s->window))));
4596 (s->end - s->read) + (q - s->window))));
4631 ZFREE(z, s->window);
4632 s->window = Z_NULL;
4647 Assert(s->window + n <= s->end, "set dict");
4648 zmemcpy((charf *)s->window, d, n);
4649 s->read = s->write = s->window + n;
4682 Bytef *q; /* output window write pointer */
4683 uInt m; /* bytes to end of window or read pointer */
4711 s->read = q = s->window;
5273 COPY, /* o: copying bytes in window, waiting for space */
5339 Bytef *q; /* output window write pointer */
5340 uInt m; /* bytes to end of window or read pointer */
5452 /* o: copying bytes in window, waiting for space */
5454 f = (uInt)(q - s->window) < c->sub.copy.dist ?
5455 s->end - (c->sub.copy.dist - (q - s->window)) :
5459 if ((uInt)(q - s->window) < c->sub.copy.dist)
5461 (uInt)(q - s->window));
5468 f = s->window;
5541 /* copy as much as possible from the sliding window to the output area */
5556 /* compute number of bytes to copy as far as end of window */
5569 /* copy as far as end of window */
5576 /* see if more to copy at beginning of window */
5580 q = s->window;
5582 s->write = s->window;
5642 * Called with number of bytes left to write in window at least 258
5662 Bytef *q; /* output window write pointer */
5663 uInt m; /* bytes to end of window or read pointer */
5725 if ((uInt)(q - s->window) >= d)
5743 s->window);
5748 /* copy to end of window */
5755 /* copy rest from start of window */
5756 r = s->window;