From 1c71d8b13b54f91ddec361d3053ecce26e6ff761 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:07:35 -0700 Subject: zlib 0.91 --- zconf.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'zconf.h') diff --git a/zconf.h b/zconf.h index 4e05a3e..1abb0ea 100644 --- a/zconf.h +++ b/zconf.h @@ -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 */ -- cgit v1.2.3-55-g6feb