Lines Matching defs:window

280 #  define MAX_WBITS   15 /* 32K LZ77 window */
1300 /* A Pos is an index in the character window. We use short instead of int to
1319 uInt w_size; /* LZ77 window size (32K by default) */
1323 Bytef *window;
1324 /* Sliding window. Input bytes are read into the second half of the window,
1329 * the window size to 64K, which is quite useful on MSDOS.
1330 * To do: use the user input buffer as sliding window.
1334 /* Actual size of window: 2*wSize, except when the user input buffer
1335 * is directly used as sliding window.
1341 * An index in this array is thus a window index modulo 32K.
1360 * negative when the window is moved backwards.
1368 uInt lookahead; /* number of valid bytes ahead in window */
1431 * data is still in the window so we can still emit a stored block even
1648 /* sliding window */
1649 unsigned wbits; /* log base 2 of requested window size */
1650 unsigned wsize; /* window size or zero if not using window */
1651 unsigned whave; /* valid bytes in the window */
1652 unsigned write; /* window write index */
1653 unsigned char FAR *window; /* allocated sliding window, if needed */
2077 unsigned wsize; /* window size or zero if not using window */
2078 unsigned whave; /* valid bytes in the window */
2079 unsigned write; /* window write index */
2080 unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
2089 /* window position, window bytes to copy */
2107 window = state->window;
2184 if (dist > op) { /* see if copy from window */
2185 op = dist - op; /* distance back in window */
2191 from = window - OFF;
2194 if (op < len) { /* some from window */
2202 else if (write < op) { /* wrap around window */
2205 if (op < len) { /* some from end of window */
2210 from = window - OFF;
2211 if (write < len) { /* some from start of window */
2221 else { /* contiguous in window */
2223 if (op < len) { /* some from window */
2305 - Three separate decoding do-loops for direct, window, and write == 0
2310 - Swapping window/direct else
2409 state->window = Z_NULL;
2529 Update the window with the last wsize (normally 32K) bytes written before
2530 returning. If window does not exist yet, create it. This is only called
2531 when a window is already in use, or when output has been written during this
2533 It is also called to create a window for dictionary data when a dictionary
2537 advantage, since only the last 32K of output is copied to the sliding window
2551 /* if it hasn't been done already, allocate space for the window */
2552 if (state->window == Z_NULL) {
2553 state->window = (unsigned char FAR *)
2556 if (state->window == Z_NULL) return 1;
2559 /* if window not in use yet, initialize */
2566 /* copy state->wsize or less output bytes into the circular window */
2569 zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
2576 zmemcpy(state->window + state->write, strm->next_out - copy, dist);
2579 zmemcpy(state->window, strm->next_out - copy, copy);
2757 When there is a window, goto inf_leave will update the window with the last
2759 and there is no window currently, goto inf_leave will create one and copy
2760 output to the window for the next call of inflate().
2766 the allocation of and copying into a sliding window until necessary, which
2842 strm->msg = (char *)"invalid window size";
3268 if (state->offset > copy) { /* copy from window */
3272 from = state->window + (state->wsize - copy);
3275 from = state->window + (state->write - copy);
3349 error. Call updatewindow() to create and/or update the window state.
3381 if (state->window != Z_NULL) ZFREE(strm, state->window);
3410 /* copy dictionary to window */
3416 zmemcpy(state->window, dictionary + dictLength - state->wsize,
3421 zmemcpy(state->window + state->wsize - dictLength, dictionary,
3550 unsigned char FAR *window;
3563 window = Z_NULL;
3564 if (state->window != Z_NULL) {
3565 window = (unsigned char FAR *)
3567 if (window == Z_NULL) {
3582 if (window != Z_NULL) {
3584 zmemcpy(window, state->window, wsize);
3586 copy->window = window;