44#define ZLIB_VERSION "1.3.1"
45#define ZLIB_VERNUM 0x1310
46#define ZLIB_VER_MAJOR 1
47#define ZLIB_VER_MINOR 3
48#define ZLIB_VER_REVISION 1
49#define ZLIB_VER_SUBREVISION 0
85typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
86typedef void (*free_func)(voidpf opaque, voidpf address);
91 z_const Bytef *next_in;
100 struct internal_state FAR *state;
112typedef z_stream FAR *z_streamp;
135typedef gz_header FAR *gz_headerp;
173#define Z_PARTIAL_FLUSH 1
174#define Z_SYNC_FLUSH 2
175#define Z_FULL_FLUSH 3
182#define Z_STREAM_END 1
185#define Z_STREAM_ERROR (-2)
186#define Z_DATA_ERROR (-3)
187#define Z_MEM_ERROR (-4)
188#define Z_BUF_ERROR (-5)
189#define Z_VERSION_ERROR (-6)
194#define Z_NO_COMPRESSION 0
195#define Z_BEST_SPEED 1
196#define Z_BEST_COMPRESSION 9
197#define Z_DEFAULT_COMPRESSION (-1)
201#define Z_HUFFMAN_ONLY 2
204#define Z_DEFAULT_STRATEGY 0
209#define Z_ASCII Z_TEXT
218#define zlib_version zlibVersion()
224ZEXTERN
const char * ZEXPORT zlibVersion(
void);
254ZEXTERN
int ZEXPORT deflate(z_streamp strm,
int flush);
367ZEXTERN
int ZEXPORT deflateEnd(z_streamp strm);
405ZEXTERN
int ZEXPORT inflate(z_streamp strm,
int flush);
525ZEXTERN
int ZEXPORT inflateEnd(z_streamp strm);
615ZEXTERN
int ZEXPORT deflateSetDictionary(z_streamp strm,
616 const Bytef *dictionary,
659ZEXTERN
int ZEXPORT deflateGetDictionary(z_streamp strm,
681ZEXTERN
int ZEXPORT deflateCopy(z_streamp dest,
699ZEXTERN
int ZEXPORT deflateReset(z_streamp strm);
710ZEXTERN
int ZEXPORT deflateParams(z_streamp strm,
748ZEXTERN
int ZEXPORT deflateTune(z_streamp strm,
765ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
780ZEXTERN
int ZEXPORT deflatePending(z_streamp strm,
795ZEXTERN
int ZEXPORT deflatePrime(z_streamp strm,
812ZEXTERN
int ZEXPORT deflateSetHeader(z_streamp strm,
892ZEXTERN
int ZEXPORT inflateSetDictionary(z_streamp strm,
893 const Bytef *dictionary,
915ZEXTERN
int ZEXPORT inflateGetDictionary(z_streamp strm,
930ZEXTERN
int ZEXPORT inflateSync(z_streamp strm);
949ZEXTERN
int ZEXPORT inflateCopy(z_streamp dest,
965ZEXTERN
int ZEXPORT inflateReset(z_streamp strm);
976ZEXTERN
int ZEXPORT inflateReset2(z_streamp strm,
990ZEXTERN
int ZEXPORT inflatePrime(z_streamp strm,
1011ZEXTERN
long ZEXPORT inflateMark(z_streamp strm);
1039ZEXTERN
int ZEXPORT inflateGetHeader(z_streamp strm,
1101typedef unsigned (*in_func)(
void FAR *,
1102 z_const
unsigned char FAR * FAR *);
1103typedef int (*out_func)(
void FAR *,
unsigned char FAR *, unsigned);
1105ZEXTERN
int ZEXPORT inflateBack(z_streamp strm,
1106 in_func in,
void FAR *in_desc,
1107 out_func out,
void FAR *out_desc);
1175ZEXTERN
int ZEXPORT inflateBackEnd(z_streamp strm);
1183ZEXTERN uLong ZEXPORT zlibCompileFlags(
void);
1236ZEXTERN
int ZEXPORT compress(Bytef *dest, uLongf *destLen,
1237 const Bytef *source, uLong sourceLen);
1251ZEXTERN
int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
1252 const Bytef *source, uLong sourceLen,
1267ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
1274ZEXTERN
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
1275 const Bytef *source, uLong sourceLen);
1292ZEXTERN
int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
1293 const Bytef *source, uLong *sourceLen);
1349ZEXTERN gzFile ZEXPORT gzdopen(
int fd,
const char *mode);
1372ZEXTERN
int ZEXPORT gzbuffer(gzFile file,
unsigned size);
1388ZEXTERN
int ZEXPORT gzsetparams(gzFile file,
int level,
int strategy);
1399ZEXTERN
int ZEXPORT gzread(gzFile file, voidp buf,
unsigned len);
1429ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
1455ZEXTERN
int ZEXPORT gzwrite(gzFile file, voidpc buf,
unsigned len);
1461ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
1462 z_size_t nitems, gzFile file);
1475ZEXTERN
int ZEXPORTVA gzprintf(gzFile file,
const char *format, ...);
1490ZEXTERN
int ZEXPORT gzputs(gzFile file,
const char *s);
1498ZEXTERN
char * ZEXPORT gzgets(gzFile file,
char *buf,
int len);
1512ZEXTERN
int ZEXPORT gzputc(gzFile file,
int c);
1518ZEXTERN
int ZEXPORT gzgetc(gzFile file);
1527ZEXTERN
int ZEXPORT gzungetc(
int c, gzFile file);
1539ZEXTERN
int ZEXPORT gzflush(gzFile file,
int flush);
1574ZEXTERN
int ZEXPORT gzrewind(gzFile file);
1602ZEXTERN
int ZEXPORT gzeof(gzFile file);
1617ZEXTERN
int ZEXPORT gzdirect(gzFile file);
1638ZEXTERN
int ZEXPORT gzclose(gzFile file);
1651ZEXTERN
int ZEXPORT gzclose_r(gzFile file);
1652ZEXTERN
int ZEXPORT gzclose_w(gzFile file);
1663ZEXTERN
const char * ZEXPORT gzerror(gzFile file,
int *errnum);
1679ZEXTERN
void ZEXPORT gzclearerr(gzFile file);
1696ZEXTERN uLong ZEXPORT adler32(uLong adler,
const Bytef *buf, uInt len);
1716ZEXTERN uLong ZEXPORT adler32_z(uLong adler,
const Bytef *buf,
1734ZEXTERN uLong ZEXPORT crc32(uLong crc,
const Bytef *buf, uInt len);
1752ZEXTERN uLong ZEXPORT crc32_z(uLong crc,
const Bytef *buf,
1775ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
1788ZEXTERN
int ZEXPORT deflateInit_(z_streamp strm,
int level,
1789 const char *version,
int stream_size);
1790ZEXTERN
int ZEXPORT inflateInit_(z_streamp strm,
1791 const char *version,
int stream_size);
1792ZEXTERN
int ZEXPORT deflateInit2_(z_streamp strm,
int level,
int method,
1793 int windowBits,
int memLevel,
1794 int strategy,
const char *version,
1796ZEXTERN
int ZEXPORT inflateInit2_(z_streamp strm,
int windowBits,
1797 const char *version,
int stream_size);
1798ZEXTERN
int ZEXPORT inflateBackInit_(z_streamp strm,
int windowBits,
1799 unsigned char FAR *window,
1800 const char *version,
1803# define z_deflateInit(strm, level) \
1804 deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
1805# define z_inflateInit(strm) \
1806 inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
1807# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
1808 deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
1809 (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
1810# define z_inflateInit2(strm, windowBits) \
1811 inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
1812 (int)sizeof(z_stream))
1813# define z_inflateBackInit(strm, windowBits, window) \
1814 inflateBackInit_((strm), (windowBits), (window), \
1815 ZLIB_VERSION, (int)sizeof(z_stream))
1817# define deflateInit(strm, level) \
1818 deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
1819# define inflateInit(strm) \
1820 inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
1821# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
1822 deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
1823 (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
1824# define inflateInit2(strm, windowBits) \
1825 inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
1826 (int)sizeof(z_stream))
1827# define inflateBackInit(strm, windowBits, window) \
1828 inflateBackInit_((strm), (windowBits), (window), \
1829 ZLIB_VERSION, (int)sizeof(z_stream))
1843 unsigned char *next;
1846ZEXTERN
int ZEXPORT gzgetc_(gzFile file);
1849# define z_gzgetc(g) \
1850 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
1853 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
1863 ZEXTERN gzFile ZEXPORT gzopen64(
const char *,
const char *);
1864 ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t,
int);
1865 ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
1866 ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
1867 ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
1868 ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
1869 ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
1872#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
1874# define z_gzopen z_gzopen64
1875# define z_gzseek z_gzseek64
1876# define z_gztell z_gztell64
1877# define z_gzoffset z_gzoffset64
1878# define z_adler32_combine z_adler32_combine64
1879# define z_crc32_combine z_crc32_combine64
1880# define z_crc32_combine_gen z_crc32_combine_gen64
1882# define gzopen gzopen64
1883# define gzseek gzseek64
1884# define gztell gztell64
1885# define gzoffset gzoffset64
1886# define adler32_combine adler32_combine64
1887# define crc32_combine crc32_combine64
1888# define crc32_combine_gen crc32_combine_gen64
1891 ZEXTERN gzFile ZEXPORT gzopen64(
const char *,
const char *);
1892 ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t,
int);
1893 ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
1894 ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
1895 ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
1896 ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
1897 ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
1900 ZEXTERN gzFile ZEXPORT gzopen(
const char *,
const char *);
1901 ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t,
int);
1902 ZEXTERN z_off_t ZEXPORT gztell(gzFile);
1903 ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
1904 ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
1905 ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
1906 ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
1911 ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
1912 ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
1913 ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
1918ZEXTERN
const char * ZEXPORT zError(
int);
1919ZEXTERN
int ZEXPORT inflateSyncPoint(z_streamp);
1920ZEXTERN
const z_crc_t FAR * ZEXPORT get_crc_table(
void);
1921ZEXTERN
int ZEXPORT inflateUndermine(z_streamp,
int);
1922ZEXTERN
int ZEXPORT inflateValidate(z_streamp,
int);
1923ZEXTERN
unsigned long ZEXPORT inflateCodesUsed(z_streamp);
1924ZEXTERN
int ZEXPORT inflateResetKeep(z_streamp);
1925ZEXTERN
int ZEXPORT deflateResetKeep(z_streamp);
1926#if defined(_WIN32) && !defined(Z_SOLO)
1927ZEXTERN gzFile ZEXPORT gzopen_w(
const wchar_t *path,
1930#if defined(STDC) || defined(Z_HAVE_STDARG_H)
1932ZEXTERN
int ZEXPORTVA gzvprintf(gzFile file,