Back to home page

OSCL-LXR

 
 

    


0001 /* zconf.h -- configuration of the zlib compression library
0002  * Copyright (C) 1995-1998 Jean-loup Gailly.
0003  * For conditions of distribution and use, see copyright notice in zlib.h 
0004  */
0005 
0006 /* @(#) $Id$ */
0007 
0008 #ifndef _ZCONF_H
0009 #define _ZCONF_H
0010 
0011 /* The memory requirements for deflate are (in bytes):
0012             (1 << (windowBits+2)) +  (1 << (memLevel+9))
0013  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
0014  plus a few kilobytes for small objects. For example, if you want to reduce
0015  the default memory requirements from 256K to 128K, compile with
0016      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
0017  Of course this will generally degrade compression (there's no free lunch).
0018 
0019    The memory requirements for inflate are (in bytes) 1 << windowBits
0020  that is, 32K for windowBits=15 (default value) plus a few kilobytes
0021  for small objects.
0022 */
0023 
0024 /* Maximum value for memLevel in deflateInit2 */
0025 #ifndef MAX_MEM_LEVEL
0026 #  define MAX_MEM_LEVEL 8
0027 #endif
0028 
0029 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
0030  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
0031  * created by gzip. (Files created by minigzip can still be extracted by
0032  * gzip.)
0033  */
0034 #ifndef MAX_WBITS
0035 #  define MAX_WBITS   15 /* 32K LZ77 window */
0036 #endif
0037 
0038 /* default windowBits for decompression. MAX_WBITS is for compression only */
0039 #ifndef DEF_WBITS
0040 #  define DEF_WBITS MAX_WBITS
0041 #endif
0042 
0043 /* default memLevel */
0044 #if MAX_MEM_LEVEL >= 8
0045 #  define DEF_MEM_LEVEL 8
0046 #else
0047 #  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
0048 #endif
0049 
0050                         /* Type declarations */
0051 
0052 typedef unsigned char  Byte;  /* 8 bits */
0053 typedef unsigned int   uInt;  /* 16 bits or more */
0054 typedef unsigned long  uLong; /* 32 bits or more */
0055 typedef void     *voidp;
0056 
0057 #endif /* _ZCONF_H */