initial.commit | 3d533e0 | 2008-07-27 00:38:33 +0000 | [diff] [blame] | 1 | /* inffast.h -- header to use inffast.c |
hbono@chromium.org | d2dc209 | 2011-12-12 08:48:38 +0000 | [diff] [blame] | 2 | * Copyright (C) 1995-2003, 2010 Mark Adler |
initial.commit | 3d533e0 | 2008-07-27 00:38:33 +0000 | [diff] [blame] | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
| 4 | */ |
| 5 | |
| 6 | /* WARNING: this file should *not* be used by applications. It is |
| 7 | part of the implementation of the compression library and is |
| 8 | subject to change. Applications should only use zlib.h. |
| 9 | */ |
| 10 | |
Chris Blume | b9c1566 | 2018-02-13 19:57:43 +0000 | [diff] [blame] | 11 | /* INFLATE_FAST_MIN_INPUT: the minimum number of input bytes needed so that |
| 12 | we can safely call inflate_fast() with only one up-front bounds check. One |
| 13 | length/distance code pair (15 bits for the length code, 5 bits for length |
| 14 | extra, 15 bits for the distance code, 13 bits for distance extra) requires |
| 15 | reading up to 48 input bits (6 bytes). |
| 16 | */ |
| 17 | #define INFLATE_FAST_MIN_INPUT 6 |
Chris Blume | 8888511 | 2017-09-19 23:07:57 +0000 | [diff] [blame] | 18 | |
Chris Blume | b9c1566 | 2018-02-13 19:57:43 +0000 | [diff] [blame] | 19 | /* INFLATE_FAST_MIN_OUTPUT: the minimum number of output bytes needed so that |
| 20 | we can safely call inflate_fast() with only one up-front bounds check. One |
| 21 | length/distance code pair can output up to 258 bytes, which is the maximum |
| 22 | length that can be coded. |
Chris Blume | 8888511 | 2017-09-19 23:07:57 +0000 | [diff] [blame] | 23 | */ |
Chris Blume | b9c1566 | 2018-02-13 19:57:43 +0000 | [diff] [blame] | 24 | #define INFLATE_FAST_MIN_OUTPUT 258 |
Chris Blume | 8888511 | 2017-09-19 23:07:57 +0000 | [diff] [blame] | 25 | |
hbono@chromium.org | d2dc209 | 2011-12-12 08:48:38 +0000 | [diff] [blame] | 26 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); |