Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/zlib.h
- This file was moved from sys/sys/zlib.h.
Show All 40 Lines | /*- | ||||
3. This notice may not be removed or altered from any source distribution. | 3. This notice may not be removed or altered from any source distribution. | ||||
Jean-loup Gailly Mark Adler | Jean-loup Gailly Mark Adler | ||||
gzip@prep.ai.mit.edu madler@alumni.caltech.edu | gzip@prep.ai.mit.edu madler@alumni.caltech.edu | ||||
*/ | */ | ||||
/* | /* | ||||
The data format used by the zlib library is described by RFCs (Request for | The data format used by the zlib library is described by RFCs (Request for | ||||
Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt | Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt | ||||
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). | (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). | ||||
delphij: (see comment on sys/conf/kern.pre.mk: I think we could eliminate this need). | |||||
*/ | */ | ||||
#ifndef _ZLIB_H | #ifndef _ZLIB_H | ||||
#define _ZLIB_H | #define _ZLIB_H | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
Show All 33 Lines | |||||
# define compress z_compress | # define compress z_compress | ||||
# define uncompress z_uncompress | # define uncompress z_uncompress | ||||
# define adler32 z_adler32 | # define adler32 z_adler32 | ||||
#if 0 | #if 0 | ||||
# define crc32 z_crc32 | # define crc32 z_crc32 | ||||
# define get_crc_table z_get_crc_table | # define get_crc_table z_get_crc_table | ||||
#endif | #endif | ||||
# define Byte z_Byte | # define Byte z_Byte | ||||
Done Inline Actions[OPTIONAL] I wonder if we can make deflate_copyright and inflate_copyright in sys/libkern/zlib.c static instead? delphij: [OPTIONAL] I wonder if we can make deflate_copyright and inflate_copyright in sys/libkern/zlib. | |||||
Done Inline ActionsIt appeared that these 2 variables are not used at all. Converting to static variable resulted in error. ota_j.email.ne.jp: It appeared that these 2 variables are not used at all. Converting to static variable resulted… | |||||
# define uInt z_uInt | # define uInt z_uInt | ||||
# define uLong z_uLong | # define uLong z_uLong | ||||
# define Bytef z_Bytef | # define Bytef z_Bytef | ||||
# define charf z_charf | # define charf z_charf | ||||
# define intf z_intf | # define intf z_intf | ||||
# define uIntf z_uIntf | # define uIntf z_uIntf | ||||
# define uLongf z_uLongf | # define uLongf z_uLongf | ||||
# define voidpf z_voidpf | # define voidpf z_voidpf | ||||
▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | |||||
extern const char * EXPORT zlibVersion OF((void)); | extern const char * EXPORT zlibVersion OF((void)); | ||||
/* The application can compare zlibVersion and ZLIB_VERSION for consistency. | /* The application can compare zlibVersion and ZLIB_VERSION for consistency. | ||||
If the first character differs, the library code actually used is | If the first character differs, the library code actually used is | ||||
not compatible with the zlib.h header file used by the application. | not compatible with the zlib.h header file used by the application. | ||||
This check is automatically made by deflateInit and inflateInit. | This check is automatically made by deflateInit and inflateInit. | ||||
*/ | */ | ||||
/* | /* | ||||
extern int EXPORT deflateInit OF((z_streamp strm, int level)); | extern int EXPORT deflateInit OF((z_streamp strm, int level)); | ||||
Done Inline ActionsMissed this one. ota_j.email.ne.jp: Missed this one. | |||||
Initializes the internal stream state for compression. The fields | Initializes the internal stream state for compression. The fields | ||||
zalloc, zfree and opaque must be initialized before by the caller. | zalloc, zfree and opaque must be initialized before by the caller. | ||||
If zalloc and zfree are set to Z_NULL, deflateInit updates them to | If zalloc and zfree are set to Z_NULL, deflateInit updates them to | ||||
use default allocation functions. | use default allocation functions. | ||||
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: | The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: | ||||
1 gives best speed, 9 gives best compression, 0 gives no compression at | 1 gives best speed, 9 gives best compression, 0 gives no compression at | ||||
▲ Show 20 Lines • Show All 624 Lines • Show Last 20 Lines |
(see comment on sys/conf/kern.pre.mk: I think we could eliminate this need).