zlib.h (237691) | zlib.h (254069) |
---|---|
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.7, May 2nd, 2012 | 2 version 1.2.8, April 28th, 2013 |
3 | 3 |
4 Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler | 4 Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler |
5 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 8 arising from the use of this software. 9 10 Permission is granted to anyone to use this software for any purpose, 11 including commercial applications, and to alter it and redistribute it 12 freely, subject to the following restrictions: --- 19 unchanged lines hidden (view full) --- 32#define ZLIB_H 33 34#include "zconf.h" 35 36#ifdef __cplusplus 37extern "C" { 38#endif 39 | 5 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 8 arising from the use of this software. 9 10 Permission is granted to anyone to use this software for any purpose, 11 including commercial applications, and to alter it and redistribute it 12 freely, subject to the following restrictions: --- 19 unchanged lines hidden (view full) --- 32#define ZLIB_H 33 34#include "zconf.h" 35 36#ifdef __cplusplus 37extern "C" { 38#endif 39 |
40#define ZLIB_VERSION "1.2.7" 41#define ZLIB_VERNUM 0x1270 | 40#define ZLIB_VERSION "1.2.8" 41#define ZLIB_VERNUM 0x1280 |
42#define ZLIB_VER_MAJOR 1 43#define ZLIB_VER_MINOR 2 | 42#define ZLIB_VER_MAJOR 1 43#define ZLIB_VER_MINOR 2 |
44#define ZLIB_VER_REVISION 7 | 44#define ZLIB_VER_REVISION 8 |
45#define ZLIB_VER_SUBREVISION 0 46 47/* 48 The 'zlib' compression library provides in-memory compression and 49 decompression functions, including integrity checks of the uncompressed data. 50 This version of the library supports only one compression method (deflation) 51 but other algorithms will be added later and will have the same stream 52 interface. --- 781 unchanged lines hidden (view full) --- 834 inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a 835 parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is 836 inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the 837 expected one (incorrect adler32 value). inflateSetDictionary does not 838 perform any decompression: this will be done by subsequent calls of 839 inflate(). 840*/ 841 | 45#define ZLIB_VER_SUBREVISION 0 46 47/* 48 The 'zlib' compression library provides in-memory compression and 49 decompression functions, including integrity checks of the uncompressed data. 50 This version of the library supports only one compression method (deflation) 51 but other algorithms will be added later and will have the same stream 52 interface. --- 781 unchanged lines hidden (view full) --- 834 inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a 835 parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is 836 inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the 837 expected one (incorrect adler32 value). inflateSetDictionary does not 838 perform any decompression: this will be done by subsequent calls of 839 inflate(). 840*/ 841 |
842ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, 843 Bytef *dictionary, 844 uInt *dictLength)); 845/* 846 Returns the sliding dictionary being maintained by inflate. dictLength is 847 set to the number of bytes in the dictionary, and that many bytes are copied 848 to dictionary. dictionary must have enough space, where 32768 bytes is 849 always enough. If inflateGetDictionary() is called with dictionary equal to 850 Z_NULL, then only the dictionary length is returned, and nothing is copied. 851 Similary, if dictLength is Z_NULL, then it is not set. 852 853 inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the 854 stream state is inconsistent. 855*/ 856 |
|
842ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); 843/* 844 Skips invalid compressed data until a possible full flush point (see above 845 for the description of deflate with Z_FULL_FLUSH) can be found, or until all 846 available input is skipped. No output is provided. 847 848 inflateSync searches for a 00 00 FF FF pattern in the compressed data. 849 All full flush points have this pattern, but not all occurences of this --- 152 unchanged lines hidden (view full) --- 1002 See inflateBack() for the usage of these routines. 1003 1004 inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 1005 the parameters are invalid, Z_MEM_ERROR if the internal state could not be 1006 allocated, or Z_VERSION_ERROR if the version of the library does not match 1007 the version of the header file. 1008*/ 1009 | 857ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); 858/* 859 Skips invalid compressed data until a possible full flush point (see above 860 for the description of deflate with Z_FULL_FLUSH) can be found, or until all 861 available input is skipped. No output is provided. 862 863 inflateSync searches for a 00 00 FF FF pattern in the compressed data. 864 All full flush points have this pattern, but not all occurences of this --- 152 unchanged lines hidden (view full) --- 1017 See inflateBack() for the usage of these routines. 1018 1019 inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 1020 the parameters are invalid, Z_MEM_ERROR if the internal state could not be 1021 allocated, or Z_VERSION_ERROR if the version of the library does not match 1022 the version of the header file. 1023*/ 1024 |
1010typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); | 1025typedef unsigned (*in_func) OF((void FAR *, 1026 z_const unsigned char FAR * FAR *)); |
1011typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); 1012 1013ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, 1014 in_func in, void FAR *in_desc, 1015 out_func out, void FAR *out_desc)); 1016/* 1017 inflateBack() does a raw inflate with a single call using a call-back | 1027typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); 1028 1029ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, 1030 in_func in, void FAR *in_desc, 1031 out_func out, void FAR *out_desc)); 1032/* 1033 inflateBack() does a raw inflate with a single call using a call-back |
1018 interface for input and output. This is more efficient than inflate() for 1019 file i/o applications in that it avoids copying between the output and the 1020 sliding window by simply making the window itself the output buffer. This 1021 function trusts the application to not change the output buffer passed by 1022 the output function, at least until inflateBack() returns. | 1034 interface for input and output. This is potentially more efficient than 1035 inflate() for file i/o applications, in that it avoids copying between the 1036 output and the sliding window by simply making the window itself the output 1037 buffer. inflate() can be faster on modern CPUs when used with large 1038 buffers. inflateBack() trusts the application to not change the output 1039 buffer passed by the output function, at least until inflateBack() returns. |
1023 1024 inflateBackInit() must be called first to allocate the internal state 1025 and to initialize the state with the user-provided window buffer. 1026 inflateBack() may then be used multiple times to inflate a complete, raw 1027 deflate stream with each call. inflateBackEnd() is then called to free the 1028 allocated state. 1029 1030 A raw deflate stream is one with no zlib or gzip header or trailer. --- 700 unchanged lines hidden (view full) --- 1731ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); 1732ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); 1733ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); 1734ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); 1735#if defined(_WIN32) && !defined(Z_SOLO) 1736ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, 1737 const char *mode)); 1738#endif | 1040 1041 inflateBackInit() must be called first to allocate the internal state 1042 and to initialize the state with the user-provided window buffer. 1043 inflateBack() may then be used multiple times to inflate a complete, raw 1044 deflate stream with each call. inflateBackEnd() is then called to free the 1045 allocated state. 1046 1047 A raw deflate stream is one with no zlib or gzip header or trailer. --- 700 unchanged lines hidden (view full) --- 1748ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); 1749ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); 1750ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); 1751ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); 1752#if defined(_WIN32) && !defined(Z_SOLO) 1753ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, 1754 const char *mode)); 1755#endif |
1756#if defined(STDC) || defined(Z_HAVE_STDARG_H) 1757# ifndef Z_SOLO 1758ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, 1759 const char *format, 1760 va_list va)); 1761# endif 1762#endif |
|
1739 1740#ifdef __cplusplus 1741} 1742#endif 1743 1744#endif /* ZLIB_H */ | 1763 1764#ifdef __cplusplus 1765} 1766#endif 1767 1768#endif /* ZLIB_H */ |