zconf.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* zconf.h -- configuration of the zlib compression library
  2.  * Copyright (C) 1995-1998 Jean-loup Gailly.
  3.  * For conditions of distribution and use, see copyright notice in zlib.h 
  4.  */
  5. /* @(#) $Id$ */
  6. #ifndef _ZCONF_H
  7. #define _ZCONF_H
  8. #if defined(__GNUC__) || defined(__386__) || defined(i386)
  9. #  ifndef __32BIT__
  10. #    define __32BIT__
  11. #  endif
  12. #endif
  13. #if defined(__STDC__) || defined(__cplusplus)
  14. #  ifndef STDC
  15. #    define STDC
  16. #  endif
  17. #endif
  18. /* The memory requirements for deflate are (in bytes):
  19.             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  20.  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  21.  plus a few kilobytes for small objects. For example, if you want to reduce
  22.  the default memory requirements from 256K to 128K, compile with
  23.      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  24.  Of course this will generally degrade compression (there's no free lunch).
  25.    The memory requirements for inflate are (in bytes) 1 << windowBits
  26.  that is, 32K for windowBits=15 (default value) plus a few kilobytes
  27.  for small objects.
  28. */
  29. /* Maximum value for memLevel in deflateInit2 */
  30. #ifndef MAX_MEM_LEVEL
  31. #  define MAX_MEM_LEVEL 9
  32. #endif
  33. /* Maximum value for windowBits in deflateInit2 and inflateInit2.
  34.  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  35.  * created by gzip. (Files created by minigzip can still be extracted by
  36.  * gzip.)
  37.  */
  38. #ifndef MAX_WBITS
  39. #  define MAX_WBITS   15 /* 32K LZ77 window */
  40. #endif
  41.                         /* Type declarations */
  42. #ifndef OF /* function prototypes */
  43. #  ifdef STDC
  44. #    define OF(args)  args
  45. #  else
  46. #    define OF(args)  ()
  47. #  endif
  48. #endif
  49. #ifndef ZEXPORT
  50. #  define ZEXPORT
  51. #endif
  52. #ifndef ZEXPORTVA
  53. #  define ZEXPORTVA
  54. #endif
  55. #ifndef ZEXTERN
  56. #  define ZEXTERN extern
  57. #endif
  58. #ifndef FAR
  59. #   define FAR
  60. #endif
  61. typedef unsigned char  Byte;  /* 8 bits */
  62. typedef unsigned int   uInt;  /* 16 bits or more */
  63. typedef unsigned long  uLong; /* 32 bits or more */
  64. typedef Byte  FAR Bytef;
  65. typedef char  FAR charf;
  66. typedef int   FAR intf;
  67. typedef uInt  FAR uIntf;
  68. typedef uLong FAR uLongf;
  69. typedef void FAR *voidpf;
  70. typedef void     *voidp;
  71. #include <linux/types.h> /* for off_t */
  72. #include <linux/unistd.h>    /* for SEEK_* and off_t */
  73. #define z_off_t  off_t
  74. #endif /* _ZCONF_H */