inffast.c (cd8822075a38d0734e74b1735e4b5dbef9789170) inffast.c (4717628ed859513a3262ea68259d0605f39de0b3)
1/* inffast.c -- fast decoding
2 * Copyright (C) 1995-2017 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5
6#include "zutil.h"
7#include "inftrees.h"
8#include "inflate.h"

--- 33 unchanged lines hidden (view full) ---

42 Therefore if strm->avail_in >= 6, then there is enough input to avoid
43 checking for available input while decoding.
44
45 - The maximum bytes that a single length/distance pair can output is 258
46 bytes, which is the maximum length that can be coded. inflate_fast()
47 requires strm->avail_out >= 258 for each loop to avoid checking for
48 output space.
49 */
1/* inffast.c -- fast decoding
2 * Copyright (C) 1995-2017 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5
6#include "zutil.h"
7#include "inftrees.h"
8#include "inflate.h"

--- 33 unchanged lines hidden (view full) ---

42 Therefore if strm->avail_in >= 6, then there is enough input to avoid
43 checking for available input while decoding.
44
45 - The maximum bytes that a single length/distance pair can output is 258
46 bytes, which is the maximum length that can be coded. inflate_fast()
47 requires strm->avail_out >= 258 for each loop to avoid checking for
48 output space.
49 */
50void ZLIB_INTERNAL inflate_fast(strm, start)
51z_streamp strm;
52unsigned start; /* inflate()'s starting value for strm->avail_out */
53{
50void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
54 struct inflate_state FAR *state;
55 z_const unsigned char FAR *in; /* local strm->next_in */
56 z_const unsigned char FAR *last; /* have enough input while in < last */
57 unsigned char FAR *out; /* local strm->next_out */
58 unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
59 unsigned char FAR *end; /* while out < end, enough space available */
60#ifdef INFLATE_STRICT
61 unsigned dmax; /* maximum distance from zlib header */

--- 262 unchanged lines hidden ---
51 struct inflate_state FAR *state;
52 z_const unsigned char FAR *in; /* local strm->next_in */
53 z_const unsigned char FAR *last; /* have enough input while in < last */
54 unsigned char FAR *out; /* local strm->next_out */
55 unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
56 unsigned char FAR *end; /* while out < end, enough space available */
57#ifdef INFLATE_STRICT
58 unsigned dmax; /* maximum distance from zlib header */

--- 262 unchanged lines hidden ---