Geant4-11
|
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#include "inffixed.h"
Go to the source code of this file.
Macros | |
#define | BITS(n) ((unsigned)hold & ((1U << (n)) - 1)) |
#define | BYTEBITS() |
#define | DROPBITS(n) |
#define | INITBITS() |
#define | LOAD() |
#define | NEEDBITS(n) |
#define | PULLBYTE() |
#define | RESTORE() |
#define | UPDATE(check, buf, len) adler32(check, buf, len) |
Functions | |
void | fixedtables (struct inflate_state FAR *state) |
int ZEXPORT | inflate (z_streamp strm, int flush) |
unsigned long ZEXPORT | inflateCodesUsed (z_streamp strm) |
int ZEXPORT | inflateCopy (z_streamp dest, z_streamp source) |
int ZEXPORT | inflateEnd (z_streamp strm) |
int ZEXPORT | inflateGetDictionary (z_streamp strm, Bytef *dictionary, uInt *dictLength) |
int ZEXPORT | inflateGetHeader (z_streamp strm, gz_headerp head) |
int ZEXPORT | inflateInit2_ (z_streamp strm, int windowBits, const char *version, int stream_size) |
int ZEXPORT | inflateInit_ (z_streamp strm, const char *version, int stream_size) |
long ZEXPORT | inflateMark (z_streamp strm) |
int ZEXPORT | inflatePrime (z_streamp strm, int bits, int value) |
int ZEXPORT | inflateReset (z_streamp strm) |
int ZEXPORT | inflateReset2 (z_streamp strm, int windowBits) |
int ZEXPORT | inflateResetKeep (z_streamp strm) |
int ZEXPORT | inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength) |
int | inflateStateCheck (z_streamp strm) |
int ZEXPORT | inflateSync (z_streamp strm) |
int ZEXPORT | inflateSyncPoint (z_streamp strm) |
int ZEXPORT | inflateUndermine (z_streamp strm, int subvert) |
int ZEXPORT | inflateValidate (z_streamp strm, int check) |
void fixedtables | OF ((struct inflate_state FAR *state)) |
unsigned syncsearch | OF ((unsigned FAR *have, const unsigned char FAR *buf, unsigned len)) |
int inflateStateCheck | OF ((z_streamp strm)) |
int updatewindow | OF ((z_streamp strm, const unsigned char FAR *end, unsigned copy)) |
unsigned | syncsearch (unsigned FAR *have, const unsigned char FAR *buf, unsigned len) |
int | updatewindow (z_streamp strm, const Bytef *end, unsigned copy) |
#define BYTEBITS | ( | ) |
#define INITBITS | ( | ) |
#define LOAD | ( | ) |
#define NEEDBITS | ( | n | ) |
#define PULLBYTE | ( | ) |
#define RESTORE | ( | ) |
#define UPDATE | ( | check, | |
buf, | |||
len | |||
) | adler32(check, buf, len) |
void fixedtables | ( | struct inflate_state FAR * | state | ) |
Definition at line 278 of file inflate.c.
References inflate_state::bits, inflate_state::distbits, inflate_state::distcode, distfix, DISTS, inflate_table(), inflate_state::lenbits, inflate_state::lencode, lenfix, inflate_state::lens, LENS, inflate_state::next, and inflate_state::work.
Referenced by inflate().
int ZEXPORT inflate | ( | z_streamp | strm, |
int | flush | ||
) |
Definition at line 622 of file inflate.c.
References adler32(), inflate_state::back, BAD, inflate_state::bits, code::bits, BITS, BYTEBITS, CHECK, inflate_state::check, CODELENS, inflate_state::codes, CODES, COMMENT, COPY, field_utils::copy(), COPY_, crc32(), DICT, DICTID, DIST, inflate_state::distbits, inflate_state::distcode, DISTEXT, DISTS, inflate_state::dmax, DONE, DROPBITS, EXLEN, EXTRA, inflate_state::extra, fixedtables(), FLAGS, inflate_state::flags, GUNZIP, inflate_state::have, inflate_state::havedict, HCRC, HEAD, inflate_state::head, inflate_state::hold, inflate_fast(), inflate_table(), inflateStateCheck(), INITBITS, L, inflate_state::last, LEN, LEN_, inflate_state::lenbits, inflate_state::lencode, LENEXT, LENGTH, inflate_state::length, LENLENS, inflate_state::lens, LENS, LIT, LOAD, MATCH, MEM, inflate_state::mode, NAME, inflate_state::ncode, inflate_state::ndist, NEEDBITS, inflate_state::next, inflate_state::nlen, inflate_state::offset, code::op, OS, PULLBYTE, RESTORE, inflate_state::sane, STORED, inflate_state::strm, SYNC, TABLE, TIME, inflate_state::total, Trace, Tracev, Tracevv, TYPE, TYPEDO, UPDATE, updatewindow(), code::val, inflate_state::was, inflate_state::wbits, inflate_state::whave, inflate_state::window, inflate_state::wnext, inflate_state::work, inflate_state::wrap, inflate_state::wsize, Z_BLOCK, Z_BUF_ERROR, Z_DATA_ERROR, Z_DEFLATED, Z_FINISH, Z_MEM_ERROR, Z_NEED_DICT, Z_NULL, Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_TREES, zmemcpy(), and ZSWAP32.
Referenced by gz_decomp(), and uncompress2().
unsigned long ZEXPORT inflateCodesUsed | ( | z_streamp | strm | ) |
Definition at line 1554 of file inflate.c.
References inflate_state::codes, inflateStateCheck(), inflate_state::next, and inflate_state::strm.
Definition at line 1461 of file inflate.c.
References inflate_state::codes, field_utils::copy(), inflate_state::distcode, ENOUGH, inflateStateCheck(), inflate_state::lencode, inflate_state::next, inflate_state::wbits, inflate_state::window, inflate_state::wsize, Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, ZALLOC, ZFREE, and zmemcpy().
int ZEXPORT inflateEnd | ( | z_streamp | strm | ) |
Definition at line 1277 of file inflate.c.
References inflateStateCheck(), inflate_state::strm, Tracev, inflate_state::window, Z_NULL, Z_OK, Z_STREAM_ERROR, and ZFREE.
Referenced by gzclose_r(), and uncompress2().
int ZEXPORT inflateGetDictionary | ( | z_streamp | strm, |
Bytef * | dictionary, | ||
uInt * | dictLength | ||
) |
Definition at line 1291 of file inflate.c.
References inflateStateCheck(), inflate_state::strm, inflate_state::whave, inflate_state::window, inflate_state::wnext, Z_NULL, Z_OK, Z_STREAM_ERROR, and zmemcpy().
int ZEXPORT inflateGetHeader | ( | z_streamp | strm, |
gz_headerp | head | ||
) |
Definition at line 1349 of file inflate.c.
References inflate_state::head, inflateStateCheck(), inflate_state::strm, inflate_state::wrap, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT inflateInit2_ | ( | z_streamp | strm, |
int | windowBits, | ||
const char * | version, | ||
int | stream_size | ||
) |
Definition at line 195 of file inflate.c.
References HEAD, inflateReset2(), inflate_state::mode, internal_state::strm, inflate_state::strm, Tracev, inflate_state::window, Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_ERROR, Z_VERSION_ERROR, ZALLOC, zcalloc(), zcfree(), ZFREE, and ZLIB_VERSION.
Referenced by inflateInit_().
int ZEXPORT inflateInit_ | ( | z_streamp | strm, |
const char * | version, | ||
int | stream_size | ||
) |
Definition at line 239 of file inflate.c.
References DEF_WBITS, inflateInit2_(), and internal_state::strm.
long ZEXPORT inflateMark | ( | z_streamp | strm | ) |
Definition at line 1541 of file inflate.c.
References inflate_state::back, COPY, inflateStateCheck(), inflate_state::length, MATCH, inflate_state::mode, inflate_state::strm, and inflate_state::was.
int ZEXPORT inflatePrime | ( | z_streamp | strm, |
int | bits, | ||
int | value | ||
) |
Definition at line 247 of file inflate.c.
References inflate_state::bits, inflate_state::hold, inflateStateCheck(), inflate_state::strm, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT inflateReset | ( | z_streamp | strm | ) |
Definition at line 144 of file inflate.c.
References inflateResetKeep(), inflateStateCheck(), inflate_state::strm, inflate_state::whave, inflate_state::wnext, inflate_state::wsize, and Z_STREAM_ERROR.
Referenced by gz_look(), inflateReset2(), and inflateSync().
int ZEXPORT inflateReset2 | ( | z_streamp | strm, |
int | windowBits | ||
) |
Definition at line 157 of file inflate.c.
References inflateReset(), inflateStateCheck(), inflate_state::strm, inflate_state::wbits, inflate_state::window, inflate_state::wrap, Z_NULL, Z_STREAM_ERROR, and ZFREE.
Referenced by inflateInit2_().
int ZEXPORT inflateResetKeep | ( | z_streamp | strm | ) |
Definition at line 119 of file inflate.c.
References inflate_state::back, inflate_state::bits, inflate_state::codes, inflate_state::distcode, inflate_state::dmax, inflate_state::havedict, HEAD, inflate_state::head, inflate_state::hold, inflateStateCheck(), inflate_state::last, inflate_state::lencode, inflate_state::mode, inflate_state::next, inflate_state::sane, inflate_state::strm, inflate_state::total, Tracev, inflate_state::wrap, Z_NULL, Z_OK, and Z_STREAM_ERROR.
Referenced by inflateReset().
int ZEXPORT inflateSetDictionary | ( | z_streamp | strm, |
const Bytef * | dictionary, | ||
uInt | dictLength | ||
) |
Definition at line 1314 of file inflate.c.
References adler32(), inflate_state::check, DICT, inflate_state::havedict, inflateStateCheck(), L, MEM, inflate_state::mode, inflate_state::strm, Tracev, updatewindow(), inflate_state::wrap, Z_DATA_ERROR, Z_MEM_ERROR, Z_NULL, Z_OK, and Z_STREAM_ERROR.
int inflateStateCheck | ( | z_streamp | strm | ) |
Definition at line 105 of file inflate.c.
References HEAD, inflate_state::mode, inflate_state::strm, SYNC, and Z_NULL.
Referenced by inflate(), inflateCodesUsed(), inflateCopy(), inflateEnd(), inflateGetDictionary(), inflateGetHeader(), inflateMark(), inflatePrime(), inflateReset(), inflateReset2(), inflateResetKeep(), inflateSetDictionary(), inflateSync(), inflateSyncPoint(), inflateUndermine(), and inflateValidate().
int ZEXPORT inflateSync | ( | z_streamp | strm | ) |
Definition at line 1400 of file inflate.c.
References inflate_state::bits, inflate_state::have, inflate_state::hold, inflateReset(), inflateStateCheck(), inflate_state::mode, inflate_state::strm, SYNC, syncsearch(), TYPE, Z_BUF_ERROR, Z_DATA_ERROR, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT inflateSyncPoint | ( | z_streamp | strm | ) |
Definition at line 1451 of file inflate.c.
References inflate_state::bits, inflateStateCheck(), inflate_state::mode, STORED, inflate_state::strm, and Z_STREAM_ERROR.
int ZEXPORT inflateUndermine | ( | z_streamp | strm, |
int | subvert | ||
) |
Definition at line 1508 of file inflate.c.
References inflateStateCheck(), inflate_state::sane, inflate_state::strm, Z_DATA_ERROR, Z_OK, and Z_STREAM_ERROR.
int ZEXPORT inflateValidate | ( | z_streamp | strm, |
int | check | ||
) |
Definition at line 1526 of file inflate.c.
References inflate_state::check, inflateStateCheck(), inflate_state::strm, inflate_state::wrap, Z_OK, and Z_STREAM_ERROR.
void fixedtables OF | ( | (struct inflate_state FAR *state) | ) |
unsigned syncsearch OF | ( | (unsigned FAR *have, const unsigned char FAR *buf, unsigned len) | ) |
int inflateStateCheck OF | ( | (z_streamp strm) | ) |
int updatewindow OF | ( | (z_streamp strm, const unsigned char FAR *end, unsigned copy) | ) |
unsigned syncsearch | ( | unsigned FAR * | have, |
const unsigned char FAR * | buf, | ||
unsigned | len | ||
) |
Definition at line 1377 of file inflate.c.
References inflate_state::have, and inflate_state::next.
Referenced by inflateSync().
int updatewindow | ( | z_streamp | strm, |
const Bytef * | end, | ||
unsigned | copy | ||
) |
Definition at line 396 of file inflate.c.
References field_utils::copy(), inflate_state::strm, inflate_state::wbits, inflate_state::whave, inflate_state::window, inflate_state::wnext, inflate_state::wsize, Z_NULL, ZALLOC, and zmemcpy().
Referenced by inflate(), and inflateSetDictionary().