3
/* zconf.h -- configuration of the zlib compression library
4
* Copyright (C) 1995-1996 Jean-loup Gailly.
5
* For conditions of distribution and use, see copyright notice in zlib.h
14
* If you *really* need a unique prefix for all types and library functions,
15
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
18
# define deflateInit_ z_deflateInit_
19
# define deflate z_deflate
20
# define deflateEnd z_deflateEnd
21
# define inflateInit_ z_inflateInit_
22
# define inflate z_inflate
23
# define inflateEnd z_inflateEnd
24
# define deflateInit2_ z_deflateInit2_
25
# define deflateSetDictionary z_deflateSetDictionary
26
# define deflateCopy z_deflateCopy
27
# define deflateReset z_deflateReset
28
# define deflateParams z_deflateParams
29
# define inflateInit2_ z_inflateInit2_
30
# define inflateSetDictionary z_inflateSetDictionary
31
# define inflateSync z_inflateSync
32
# define inflateReset z_inflateReset
33
# define compress z_compress
34
# define uncompress z_uncompress
35
# define adler32 z_adler32
36
# define crc32 z_crc32
37
# define get_crc_table z_get_crc_table
41
# define uLong z_uLong
42
# define Bytef z_Bytef
43
# define charf z_charf
45
# define uIntf z_uIntf
46
# define uLongf z_uLongf
47
# define voidpf z_voidpf
48
# define voidp z_voidp
51
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
54
#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
59
#if defined(__MSDOS__) && !defined(MSDOS)
64
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
65
* than 64k bytes at a time (needed on systems with 16-bit int).
67
#if defined(MSDOS) && !defined(__32BIT__)
74
#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
77
#if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
82
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
87
/* Some Mac compilers merge all .h files incorrectly: */
88
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
89
# define NO_DUMMY_DECL
92
/* Maximum value for memLevel in deflateInit2 */
95
# define MAX_MEM_LEVEL 8
97
# define MAX_MEM_LEVEL 9
101
/* Maximum value for windowBits in deflateInit2 and inflateInit2 */
103
# define MAX_WBITS 15 /* 32K LZ77 window */
106
/* The memory requirements for deflate are (in bytes):
107
1 << (windowBits+2) + 1 << (memLevel+9)
108
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
109
plus a few kilobytes for small objects. For example, if you want to reduce
110
the default memory requirements from 256K to 128K, compile with
111
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
112
Of course this will generally degrade compression (there's no free lunch).
114
The memory requirements for inflate are (in bytes) 1 << windowBits
115
that is, 32K for windowBits=15 (default value) plus a few kilobytes
119
/* Type declarations */
121
#ifndef OF /* function prototypes */
123
# define OF(args) args
129
/* The following definitions for FAR are needed only for MSDOS mixed
130
* model programming (small or medium model with some far allocations).
131
* This was tested only with MSC; for other MSDOS compilers you may have
132
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
133
* just define FAR to be empty.
135
#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
136
/* MSC small or medium model */
137
# define SMALL_MEDIUM
144
#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
146
# define SMALL_MEDIUM
154
typedef unsigned char Byte; /* 8 bits */
155
typedef unsigned int uInt; /* 16 bits or more */
156
typedef unsigned long uLong; /* 32 bits or more */
158
#if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
159
/* Borland C/C++ ignores FAR inside typedef */
160
# define Bytef Byte FAR
162
typedef Byte FAR Bytef;
164
typedef char FAR charf;
165
typedef int FAR intf;
166
typedef uInt FAR uIntf;
167
typedef uLong FAR uLongf;
170
typedef void FAR *voidpf;
173
typedef Byte FAR *voidpf;
178
/* Compile with -DZLIB_DLL for Windows DLL support */
179
#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
180
# include <windows.h>
181
# define EXPORT WINAPI
186
#endif /* _ZCONF_H */