18c2ecf20Sopenharmony_ci/* zconf.h -- configuration of the zlib compression library 28c2ecf20Sopenharmony_ci * Copyright (C) 1995-1998 Jean-loup Gailly. 38c2ecf20Sopenharmony_ci * For conditions of distribution and use, see copyright notice in zlib.h 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* @(#) $Id$ */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _ZCONF_H 98c2ecf20Sopenharmony_ci#define _ZCONF_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* The memory requirements for deflate are (in bytes): 128c2ecf20Sopenharmony_ci (1 << (windowBits+2)) + (1 << (memLevel+9)) 138c2ecf20Sopenharmony_ci that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 148c2ecf20Sopenharmony_ci plus a few kilobytes for small objects. For example, if you want to reduce 158c2ecf20Sopenharmony_ci the default memory requirements from 256K to 128K, compile with 168c2ecf20Sopenharmony_ci make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 178c2ecf20Sopenharmony_ci Of course this will generally degrade compression (there's no free lunch). 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci The memory requirements for inflate are (in bytes) 1 << windowBits 208c2ecf20Sopenharmony_ci that is, 32K for windowBits=15 (default value) plus a few kilobytes 218c2ecf20Sopenharmony_ci for small objects. 228c2ecf20Sopenharmony_ci*/ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* Maximum value for memLevel in deflateInit2 */ 258c2ecf20Sopenharmony_ci#ifndef MAX_MEM_LEVEL 268c2ecf20Sopenharmony_ci# define MAX_MEM_LEVEL 8 278c2ecf20Sopenharmony_ci#endif 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* Maximum value for windowBits in deflateInit2 and inflateInit2. 308c2ecf20Sopenharmony_ci * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 318c2ecf20Sopenharmony_ci * created by gzip. (Files created by minigzip can still be extracted by 328c2ecf20Sopenharmony_ci * gzip.) 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci#ifndef MAX_WBITS 358c2ecf20Sopenharmony_ci# define MAX_WBITS 15 /* 32K LZ77 window */ 368c2ecf20Sopenharmony_ci#endif 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* default windowBits for decompression. MAX_WBITS is for compression only */ 398c2ecf20Sopenharmony_ci#ifndef DEF_WBITS 408c2ecf20Sopenharmony_ci# define DEF_WBITS MAX_WBITS 418c2ecf20Sopenharmony_ci#endif 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* default memLevel */ 448c2ecf20Sopenharmony_ci#if MAX_MEM_LEVEL >= 8 458c2ecf20Sopenharmony_ci# define DEF_MEM_LEVEL 8 468c2ecf20Sopenharmony_ci#else 478c2ecf20Sopenharmony_ci# define DEF_MEM_LEVEL MAX_MEM_LEVEL 488c2ecf20Sopenharmony_ci#endif 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci /* Type declarations */ 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_citypedef unsigned char Byte; /* 8 bits */ 538c2ecf20Sopenharmony_citypedef unsigned int uInt; /* 16 bits or more */ 548c2ecf20Sopenharmony_citypedef unsigned long uLong; /* 32 bits or more */ 558c2ecf20Sopenharmony_citypedef void *voidp; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* _ZCONF_H */ 58