diff options
author | Ladislav Zezula <zezula@volny.cz> | 2020-05-10 06:43:37 +0200 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2020-05-10 06:43:37 +0200 |
commit | 6065d16ba99f40011c494a31a8f65b7edd15025e (patch) | |
tree | 4fdfc84ff5c9882d775b1e3da2ce70020ab5a39c /src/zlib/inflate.h | |
parent | 147b4aa7e5278287e235cad1849e0d9dd0d5a0f0 (diff) |
* ZLIB updated
* Minor fixes
Diffstat (limited to 'src/zlib/inflate.h')
-rw-r--r-- | src/zlib/inflate.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/zlib/inflate.h b/src/zlib/inflate.h index 95f4986..eaef3dc 100644 --- a/src/zlib/inflate.h +++ b/src/zlib/inflate.h @@ -1,5 +1,5 @@ /* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,6 +8,9 @@ subject to change. Applications should only use zlib.h. */ +#ifndef __INFLATE_H_ +#define __INFLATE_H_ + /* define NO_GZIP when compiling if you want to disable gzip header and trailer decoding by inflate(). NO_GZIP would be used to avoid linking in the crc code when it is not needed. For shared libraries, gzip decoding @@ -18,7 +21,7 @@ /* Possible inflate modes between inflate() calls */ typedef enum { - HEAD, /* i: waiting for magic header */ + HEAD = 16180, /* i: waiting for magic header */ FLAGS, /* i: waiting for method and flags (gzip) */ TIME, /* i: waiting for modification time (gzip) */ OS, /* i: waiting for extra flags and operating system (gzip) */ @@ -77,11 +80,14 @@ typedef enum { CHECK -> LENGTH -> DONE */ -/* state maintained between inflate() calls. Approximately 10K bytes. */ +/* State maintained between inflate() calls -- approximately 7K bytes, not + including the allocated sliding window, which is up to 32K bytes. */ struct inflate_state { + z_streamp strm; /* pointer back to this zlib stream */ inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ int havedict; /* true if dictionary provided */ int flags; /* gzip header method and flags (0 if zlib) */ unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ @@ -120,3 +126,5 @@ struct inflate_state { int back; /* bits back of last unprocessed length/lit */ unsigned was; /* initial length of match */ }; + +#endif __INFLATE_H_ |