summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h53
1 files changed, 34 insertions, 19 deletions
diff --git a/zlib.h b/zlib.h
index 0228179..20dbcd0 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1,7 +1,7 @@
1/* zlib.h -- interface of the 'zlib' general purpose compression library 1/* zlib.h -- interface of the 'zlib' general purpose compression library
2 version 1.2.3, July 18th, 2005 2 version 1.2.3.1, August 16th, 2006
3 3
4 Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler 4 Copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
5 5
6 This software is provided 'as-is', without any express or implied 6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages 7 warranty. In no event will the authors be held liable for any damages
@@ -37,8 +37,11 @@
37extern "C" { 37extern "C" {
38#endif 38#endif
39 39
40#define ZLIB_VERSION "1.2.3" 40#define ZLIB_VERSION "1.2.3.1"
41#define ZLIB_VERNUM 0x1230 41#define ZLIB_VERNUM 0x1231
42#define ZLIB_VER_MAJOR 1
43#define ZLIB_VER_MINOR 2
44#define ZLIB_VER_REVISION 3
42 45
43/* 46/*
44 The 'zlib' compression library provides in-memory compression and 47 The 'zlib' compression library provides in-memory compression and
@@ -353,10 +356,14 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
353 356
354 inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough 357 inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
355 memory, Z_VERSION_ERROR if the zlib library version is incompatible with the 358 memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
356 version assumed by the caller. msg is set to null if there is no error 359 version assumed by the caller, or Z_STREAM_ERROR if the parameters are
357 message. inflateInit does not perform any decompression apart from reading 360 invalid, such as a null pointer to the structure. msg is set to null if
358 the zlib header if present: this will be done by inflate(). (So next_in and 361 there is no error message. inflateInit does not perform any decompression
359 avail_in may be modified, but next_out and avail_out are unchanged.) 362 apart from possibly reading the zlib header if present: actual decompression
363 will be done by inflate(). (So next_in and avail_in may be modified, but
364 next_out and avail_out are unused and unchanged.) The current
365 implementation of inflateInit() does not process any header information --
366 that is deferred until inflate() is called.
360*/ 367*/
361 368
362 369
@@ -645,9 +652,10 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
645 uLong sourceLen)); 652 uLong sourceLen));
646/* 653/*
647 deflateBound() returns an upper bound on the compressed size after 654 deflateBound() returns an upper bound on the compressed size after
648 deflation of sourceLen bytes. It must be called after deflateInit() 655 deflation of sourceLen bytes. It must be called after deflateInit() or
649 or deflateInit2(). This would be used to allocate an output buffer 656 deflateInit2(), and after deflateSetHeader(), if used. This would be used
650 for deflation in a single pass, and so would be called before deflate(). 657 to allocate an output buffer for deflation in a single pass, and so would be
658 called before deflate().
651*/ 659*/
652 660
653ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, 661ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
@@ -726,11 +734,15 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
726 a crc32 instead of an adler32. 734 a crc32 instead of an adler32.
727 735
728 inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 736 inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
729 memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg 737 memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
730 is set to null if there is no error message. inflateInit2 does not perform 738 version assumed by the caller, or Z_STREAM_ERROR if the parameters are
731 any decompression apart from reading the zlib header if present: this will 739 invalid, such as a null pointer to the structure. msg is set to null if
732 be done by inflate(). (So next_in and avail_in may be modified, but next_out 740 there is no error message. inflateInit2 does not perform any decompression
733 and avail_out are unchanged.) 741 apart from possibly reading the zlib header if present: actual decompression
742 will be done by inflate(). (So next_in and avail_in may be modified, but
743 next_out and avail_out are unused and unchanged.) The current
744 implementation of inflateInit2() does not process any header information --
745 that is deferred until inflate() is called.
734*/ 746*/
735 747
736ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, 748ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
@@ -1230,7 +1242,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
1230/* 1242/*
1231 Flushes all pending output if necessary, closes the compressed file 1243 Flushes all pending output if necessary, closes the compressed file
1232 and deallocates all the (de)compression state. The return value is the zlib 1244 and deallocates all the (de)compression state. The return value is the zlib
1233 error number (see function gzerror below). 1245 error number. Note that once file is close, you cannot call gzerror with
1246 file, since its structures have been deallocated.
1234*/ 1247*/
1235 1248
1236ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); 1249ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
@@ -1240,6 +1253,9 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
1240 error occurred in the file system and not in the compression library, 1253 error occurred in the file system and not in the compression library,
1241 errnum is set to Z_ERRNO and the application may consult errno 1254 errnum is set to Z_ERRNO and the application may consult errno
1242 to get the exact error code. 1255 to get the exact error code.
1256
1257 The application must not modify the returned string and future calls to
1258 this function may invalidate the returned string.
1243*/ 1259*/
1244 1260
1245ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); 1261ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
@@ -1339,8 +1355,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1339 inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) 1355 inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
1340#define inflateBackInit(strm, windowBits, window) \ 1356#define inflateBackInit(strm, windowBits, window) \
1341 inflateBackInit_((strm), (windowBits), (window), \ 1357 inflateBackInit_((strm), (windowBits), (window), \
1342 ZLIB_VERSION, sizeof(z_stream)) 1358 ZLIB_VERSION, sizeof(z_stream))
1343
1344 1359
1345#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) 1360#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
1346 struct internal_state {int dummy;}; /* hack for buggy compilers */ 1361 struct internal_state {int dummy;}; /* hack for buggy compilers */