diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:07:35 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:07:35 -0700 |
commit | 1c71d8b13b54f91ddec361d3053ecce26e6ff761 (patch) | |
tree | 84f806bb79cc8c7458ddbd7b5402dbf1eec76dd4 /zconf.h | |
parent | 64b2e892035cf6ea98800c54dce0d63730d50272 (diff) | |
download | zlib-1c71d8b13b54f91ddec361d3053ecce26e6ff761.tar.gz |
zlib 0.91v0.91
Diffstat (limited to 'zconf.h')
-rw-r--r-- | zconf.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: zconf.h,v 1.10 1995/04/30 19:27:14 jloup Exp $ */ +/* $Id: zconf.h,v 1.11 1995/05/02 13:07:21 jloup Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H @@ -32,6 +32,7 @@ # define STDC #endif +/* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K # define MAX_MEM_LEVEL 8 @@ -40,10 +41,24 @@ # endif #endif +/* Maximum value for windowBits in deflateInit2 and inflateInit2 */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif +/* The memory requirements for deflate are (in bytes): + 1 << (windowBits+2) + 1 << (memLevel+9) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + /* Type declarations */ #ifndef __P /* function prototypes */ |