10
|
1 /* zconf.h -- configuration of the zlib compression library
|
|
2 * Copyright (C) 1995 Jean-loup Gailly.
|
|
3 * For conditions of distribution and use, see copyright notice in zlib.h
|
|
4 */
|
|
5
|
|
6 /* $Id: zconf.h,v 1.1.1.1 1997/12/06 04:37:17 darius Exp $ */
|
|
7
|
|
8 #ifndef _ZCONF_H
|
|
9 #define _ZCONF_H
|
|
10
|
|
11 /*
|
|
12 The library does not install any signal handler. It is recommended to
|
|
13 add at least a handler for SIGSEGV when decompressing; the library checks
|
|
14 the consistency of the input data whenever possible but may go nuts
|
|
15 for some forms of corrupted input.
|
|
16 */
|
|
17
|
|
18 /*
|
|
19 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
|
20 * than 64k bytes at a time (needed on systems with 16-bit int).
|
|
21 */
|
|
22 #if defined(_GNUC__) && !defined(__32BIT__)
|
|
23 # define __32BIT__
|
|
24 #endif
|
|
25 #if defined(__MSDOS__) && !defined(MSDOS)
|
|
26 # define MSDOS
|
|
27 #endif
|
|
28 #if defined(MSDOS) && !defined(__32BIT__)
|
|
29 # define MAXSEG_64K
|
|
30 #endif
|
|
31 #if !defined(STDC) && (defined(MSDOS) || defined(__STDC__))
|
|
32 # define STDC
|
|
33 #endif
|
|
34
|
|
35 /* Maximum value for memLevel in deflateInit2 */
|
|
36 #ifndef MAX_MEM_LEVEL
|
|
37 # ifdef MAXSEG_64K
|
|
38 # define MAX_MEM_LEVEL 8
|
|
39 # else
|
|
40 # define MAX_MEM_LEVEL 9
|
|
41 # endif
|
|
42 #endif
|
|
43
|
|
44 /* Maximum value for windowBits in deflateInit2 and inflateInit2 */
|
|
45 #ifndef MAX_WBITS
|
|
46 # define MAX_WBITS 15 /* 32K LZ77 window */
|
|
47 #endif
|
|
48
|
|
49 /* The memory requirements for deflate are (in bytes):
|
|
50 1 << (windowBits+2) + 1 << (memLevel+9)
|
|
51 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
|
52 plus a few kilobytes for small objects. For example, if you want to reduce
|
|
53 the default memory requirements from 256K to 128K, compile with
|
|
54 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
|
55 Of course this will generally degrade compression (there's no free lunch).
|
|
56
|
|
57 The memory requirements for inflate are (in bytes) 1 << windowBits
|
|
58 that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
|
59 for small objects.
|
|
60 */
|
|
61
|
|
62 /* Type declarations */
|
|
63
|
|
64 #ifndef __P /* function prototypes */
|
|
65 # ifdef STDC
|
|
66 # define __P(args) args
|
|
67 # else
|
|
68 # define __P(args) ()
|
|
69 # endif
|
|
70 #endif
|
|
71
|
|
72 #ifndef Byte
|
|
73 typedef unsigned char Byte; /* 8 bits */
|
|
74 #endif
|
|
75 #ifndef uInt
|
|
76 typedef unsigned int uInt; /* 16 bits or more */
|
|
77 #endif
|
|
78 #ifndef uLong
|
|
79 typedef unsigned long uLong; /* 32 bits or more */
|
|
80 #endif
|
|
81 #ifndef voidp
|
|
82 # ifdef STDC
|
|
83 typedef void *voidp;
|
|
84 # else
|
|
85 typedef Byte *voidp;
|
|
86 # endif
|
|
87 #endif
|
|
88
|
|
89 #endif /* _ZCONF_H */
|
|
90
|