< prev index next >

src/java.base/share/native/libzip/zlib/zlib.h

Print this page
*** 21,13 ***
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
  /* zlib.h -- interface of the 'zlib' general purpose compression library
!   version 1.2.13, October 13th, 2022
  
!   Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
  
    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.
  
--- 21,13 ---
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
  /* zlib.h -- interface of the 'zlib' general purpose compression library
!   version 1.3.1, January 22nd, 2024
  
!   Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
  
    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.
  

*** 59,15 ***
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
! #define ZLIB_VERSION "1.2.13"
! #define ZLIB_VERNUM 0x12d0
  #define ZLIB_VER_MAJOR 1
! #define ZLIB_VER_MINOR 2
! #define ZLIB_VER_REVISION 13
  #define ZLIB_VER_SUBREVISION 0
  
  /*
      The 'zlib' compression library provides in-memory compression and
    decompression functions, including integrity checks of the uncompressed data.
--- 59,15 ---
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
! #define ZLIB_VERSION "1.3.1"
! #define ZLIB_VERNUM 0x1310
  #define ZLIB_VER_MAJOR 1
! #define ZLIB_VER_MINOR 3
! #define ZLIB_VER_REVISION 1
  #define ZLIB_VER_SUBREVISION 0
  
  /*
      The 'zlib' compression library provides in-memory compression and
    decompression functions, including integrity checks of the uncompressed data.

*** 100,12 ***
      The library does not install any signal handler.  The decoder checks
    the consistency of the compressed data, so the library should never crash
    even in the case of corrupted input.
  */
  
! typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
! typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
  
  struct internal_state;
  
  typedef struct z_stream_s {
      z_const Bytef *next_in;     /* next input byte */
--- 100,12 ---
      The library does not install any signal handler.  The decoder checks
    the consistency of the compressed data, so the library should never crash
    even in the case of corrupted input.
  */
  
! typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
! typedef void   (*free_func)(voidpf opaque, voidpf address);
  
  struct internal_state;
  
  typedef struct z_stream_s {
      z_const Bytef *next_in;     /* next input byte */

*** 239,24 ***
  /* for compatibility with versions < 1.0.2 */
  
  
                          /* basic functions */
  
! ZEXTERN const char * ZEXPORT zlibVersion OF((void));
  /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
     If the first character differs, the library code actually used is not
     compatible with the zlib.h header file used by the application.  This check
     is automatically made by deflateInit and inflateInit.
   */
  
  /*
! ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
  
       Initializes the internal stream state for compression.  The fields
     zalloc, zfree and opaque must be initialized before by the caller.  If
     zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
!    allocation functions.
  
       The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
     1 gives best speed, 9 gives best compression, 0 gives no compression at all
     (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
     requests a default compromise between speed and compression (currently
--- 239,24 ---
  /* for compatibility with versions < 1.0.2 */
  
  
                          /* basic functions */
  
! ZEXTERN const char * ZEXPORT zlibVersion(void);
  /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
     If the first character differs, the library code actually used is not
     compatible with the zlib.h header file used by the application.  This check
     is automatically made by deflateInit and inflateInit.
   */
  
  /*
! ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
  
       Initializes the internal stream state for compression.  The fields
     zalloc, zfree and opaque must be initialized before by the caller.  If
     zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
!    allocation functions.  total_in, total_out, adler, and msg are initialized.
  
       The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
     1 gives best speed, 9 gives best compression, 0 gives no compression at all
     (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
     requests a default compromise between speed and compression (currently

*** 269,11 ***
     if there is no error message.  deflateInit does not perform any compression:
     this will be done by deflate().
  */
  
  
! ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
  /*
      deflate compresses as much data as possible, and stops when the input
    buffer becomes empty or the output buffer becomes full.  It may introduce
    some output latency (reading input without producing any output) except when
    forced to flush.
--- 269,11 ---
     if there is no error message.  deflateInit does not perform any compression:
     this will be done by deflate().
  */
  
  
! ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
  /*
      deflate compresses as much data as possible, and stops when the input
    buffer becomes empty or the output buffer becomes full.  It may introduce
    some output latency (reading input without producing any output) except when
    forced to flush.

*** 342,12 ***
  
      If deflate returns with avail_out == 0, this function must be called again
    with the same value of the flush parameter and more output space (updated
    avail_out), until the flush is complete (deflate returns with non-zero
    avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
!   avail_out is greater than six to avoid repeated flush markers due to
!   avail_out == 0 on return.
  
      If the parameter flush is set to Z_FINISH, pending input is processed,
    pending output is flushed and deflate returns with Z_STREAM_END if there was
    enough output space.  If deflate returns with Z_OK or Z_BUF_ERROR, this
    function must be called again with Z_FINISH and more output space (updated
--- 342,12 ---
  
      If deflate returns with avail_out == 0, this function must be called again
    with the same value of the flush parameter and more output space (updated
    avail_out), until the flush is complete (deflate returns with non-zero
    avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
!   avail_out is greater than six when the flush marker begins, in order to avoid
!   repeated flush markers upon calling deflate() again when avail_out == 0.
  
      If the parameter flush is set to Z_FINISH, pending input is processed,
    pending output is flushed and deflate returns with Z_STREAM_END if there was
    enough output space.  If deflate returns with Z_OK or Z_BUF_ERROR, this
    function must be called again with Z_FINISH and more output space (updated

*** 382,11 ***
    deflate() can be called again with more input and more output space to
    continue compressing.
  */
  
  
! ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
  /*
       All dynamically allocated data structures for this stream are freed.
     This function discards any unprocessed input and does not flush any pending
     output.
  
--- 382,11 ---
    deflate() can be called again with more input and more output space to
    continue compressing.
  */
  
  
! ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
  /*
       All dynamically allocated data structures for this stream are freed.
     This function discards any unprocessed input and does not flush any pending
     output.
  

*** 397,19 ***
     deallocated).
  */
  
  
  /*
! ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
  
       Initializes the internal stream state for decompression.  The fields
     next_in, avail_in, zalloc, zfree and opaque must be initialized before by
     the caller.  In the current version of inflate, the provided input is not
     read or consumed.  The allocation of a sliding window will be deferred to
     the first call of inflate (if the decompression does not complete on the
     first call).  If zalloc and zfree are set to Z_NULL, inflateInit updates
!    them to use default allocation functions.
  
       inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
     memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
     version assumed by the caller, or Z_STREAM_ERROR if the parameters are
     invalid, such as a null pointer to the structure.  msg is set to null if
--- 397,20 ---
     deallocated).
  */
  
  
  /*
! ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
  
       Initializes the internal stream state for decompression.  The fields
     next_in, avail_in, zalloc, zfree and opaque must be initialized before by
     the caller.  In the current version of inflate, the provided input is not
     read or consumed.  The allocation of a sliding window will be deferred to
     the first call of inflate (if the decompression does not complete on the
     first call).  If zalloc and zfree are set to Z_NULL, inflateInit updates
!    them to use default allocation functions.  total_in, total_out, adler, and
+    msg are initialized.
  
       inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
     memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
     version assumed by the caller, or Z_STREAM_ERROR if the parameters are
     invalid, such as a null pointer to the structure.  msg is set to null if

*** 419,11 ***
     implementation of inflateInit() does not process any header information --
     that is deferred until inflate() is called.
  */
  
  
! ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
  /*
      inflate decompresses as much data as possible, and stops when the input
    buffer becomes empty or the output buffer becomes full.  It may introduce
    some output latency (reading input without producing any output) except when
    forced to flush.
--- 420,11 ---
     implementation of inflateInit() does not process any header information --
     that is deferred until inflate() is called.
  */
  
  
! ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
  /*
      inflate decompresses as much data as possible, and stops when the input
    buffer becomes empty or the output buffer becomes full.  It may introduce
    some output latency (reading input without producing any output) except when
    forced to flush.

*** 539,11 ***
    then call inflateSync() to look for a good compression block if a partial
    recovery of the data is to be attempted.
  */
  
  
! ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
  /*
       All dynamically allocated data structures for this stream are freed.
     This function discards any unprocessed input and does not flush any pending
     output.
  
--- 540,11 ---
    then call inflateSync() to look for a good compression block if a partial
    recovery of the data is to be attempted.
  */
  
  
! ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
  /*
       All dynamically allocated data structures for this stream are freed.
     This function discards any unprocessed input and does not flush any pending
     output.
  

*** 557,16 ***
  /*
      The following functions are needed only in some special applications.
  */
  
  /*
! ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
!                                      int  level,
!                                      int  method,
!                                      int  windowBits,
!                                      int  memLevel,
!                                      int  strategy));
  
       This is another version of deflateInit with more compression options.  The
     fields zalloc, zfree and opaque must be initialized before by the caller.
  
       The method parameter is the compression method.  It must be Z_DEFLATED in
--- 558,16 ---
  /*
      The following functions are needed only in some special applications.
  */
  
  /*
! ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
!                                  int level,
!                                  int method,
!                                  int windowBits,
!                                  int memLevel,
!                                  int strategy);
  
       This is another version of deflateInit with more compression options.  The
     fields zalloc, zfree and opaque must be initialized before by the caller.
  
       The method parameter is the compression method.  It must be Z_DEFLATED in

*** 629,13 ***
     incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
     set to null if there is no error message.  deflateInit2 does not perform any
     compression: this will be done by deflate().
  */
  
! ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
!                                              const Bytef *dictionary,
!                                              uInt  dictLength));
  /*
       Initializes the compression dictionary from the given byte sequence
     without producing any compressed output.  When using the zlib format, this
     function must be called immediately after deflateInit, deflateInit2 or
     deflateReset, and before any call of deflate.  When doing raw deflate, this
--- 630,13 ---
     incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
     set to null if there is no error message.  deflateInit2 does not perform any
     compression: this will be done by deflate().
  */
  
! ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm,
!                                          const Bytef *dictionary,
!                                          uInt  dictLength);
  /*
       Initializes the compression dictionary from the given byte sequence
     without producing any compressed output.  When using the zlib format, this
     function must be called immediately after deflateInit, deflateInit2 or
     deflateReset, and before any call of deflate.  When doing raw deflate, this

*** 673,13 ***
     inconsistent (for example if deflate has already been called for this stream
     or if not at a block boundary for raw deflate).  deflateSetDictionary does
     not perform any compression: this will be done by deflate().
  */
  
! ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
!                                              Bytef *dictionary,
!                                              uInt  *dictLength));
  /*
       Returns the sliding dictionary being maintained by deflate.  dictLength is
     set to the number of bytes in the dictionary, and that many bytes are copied
     to dictionary.  dictionary must have enough space, where 32768 bytes is
     always enough.  If deflateGetDictionary() is called with dictionary equal to
--- 674,13 ---
     inconsistent (for example if deflate has already been called for this stream
     or if not at a block boundary for raw deflate).  deflateSetDictionary does
     not perform any compression: this will be done by deflate().
  */
  
! ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm,
!                                          Bytef *dictionary,
!                                          uInt  *dictLength);
  /*
       Returns the sliding dictionary being maintained by deflate.  dictLength is
     set to the number of bytes in the dictionary, and that many bytes are copied
     to dictionary.  dictionary must have enough space, where 32768 bytes is
     always enough.  If deflateGetDictionary() is called with dictionary equal to

*** 695,12 ***
  
       deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
     stream state is inconsistent.
  */
  
! ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
!                                     z_streamp source));
  /*
       Sets the destination stream as a complete copy of the source stream.
  
       This function can be useful when several compression strategies will be
     tried, for example when there are several ways of pre-processing the input
--- 696,12 ---
  
       deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
     stream state is inconsistent.
  */
  
! ZEXTERN int ZEXPORT deflateCopy(z_streamp dest,
!                                 z_streamp source);
  /*
       Sets the destination stream as a complete copy of the source stream.
  
       This function can be useful when several compression strategies will be
     tried, for example when there are several ways of pre-processing the input

*** 713,24 ***
     enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
     (such as zalloc being Z_NULL).  msg is left unchanged in both source and
     destination.
  */
  
! ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
  /*
       This function is equivalent to deflateEnd followed by deflateInit, but
     does not free and reallocate the internal compression state.  The stream
     will leave the compression level and any other attributes that may have been
!    set unchanged.
  
       deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL).
  */
  
! ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
!                                       int level,
!                                       int strategy));
  /*
       Dynamically update the compression level and compression strategy.  The
     interpretation of level and strategy is as in deflateInit2().  This can be
     used to switch between compression and straight copy of the input data, or
     to switch to a different kind of input data requiring a different strategy.
--- 714,24 ---
     enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
     (such as zalloc being Z_NULL).  msg is left unchanged in both source and
     destination.
  */
  
! ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
  /*
       This function is equivalent to deflateEnd followed by deflateInit, but
     does not free and reallocate the internal compression state.  The stream
     will leave the compression level and any other attributes that may have been
!    set unchanged.  total_in, total_out, adler, and msg are initialized.
  
       deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL).
  */
  
! ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
!                                   int level,
!                                   int strategy);
  /*
       Dynamically update the compression level and compression strategy.  The
     interpretation of level and strategy is as in deflateInit2().  This can be
     used to switch between compression and straight copy of the input data, or
     to switch to a different kind of input data requiring a different strategy.

*** 751,26 ***
     deflate stream should be flushed using deflate() with Z_BLOCK or other flush
     request until strm.avail_out is not zero, before calling deflateParams().
     Then no more input data should be provided before the deflateParams() call.
     If this is done, the old level and strategy will be applied to the data
     compressed before deflateParams(), and the new level and strategy will be
!    applied to the the data compressed after deflateParams().
  
       deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
     state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
     there was not enough output space to complete the compression of the
     available input data before a change in the strategy or approach.  Note that
     in the case of a Z_BUF_ERROR, the parameters are not changed.  A return
     value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
     retried with more output space.
  */
  
! ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
!                                     int good_length,
!                                     int max_lazy,
!                                     int nice_length,
!                                     int max_chain));
  /*
       Fine tune deflate's internal compression parameters.  This should only be
     used by someone who understands the algorithm used by zlib's deflate for
     searching for the best matching string, and even then only by the most
     fanatic optimizer trying to squeeze out the last compressed bit for their
--- 752,26 ---
     deflate stream should be flushed using deflate() with Z_BLOCK or other flush
     request until strm.avail_out is not zero, before calling deflateParams().
     Then no more input data should be provided before the deflateParams() call.
     If this is done, the old level and strategy will be applied to the data
     compressed before deflateParams(), and the new level and strategy will be
!    applied to the data compressed after deflateParams().
  
       deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
     state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
     there was not enough output space to complete the compression of the
     available input data before a change in the strategy or approach.  Note that
     in the case of a Z_BUF_ERROR, the parameters are not changed.  A return
     value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
     retried with more output space.
  */
  
! ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
!                                 int good_length,
!                                 int max_lazy,
!                                 int nice_length,
!                                 int max_chain);
  /*
       Fine tune deflate's internal compression parameters.  This should only be
     used by someone who understands the algorithm used by zlib's deflate for
     searching for the best matching string, and even then only by the most
     fanatic optimizer trying to squeeze out the last compressed bit for their

*** 779,12 ***
  
       deflateTune() can be called after deflateInit() or deflateInit2(), and
     returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
   */
  
! ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
!                                        uLong sourceLen));
  /*
       deflateBound() returns an upper bound on the compressed size after
     deflation of sourceLen bytes.  It must be called after deflateInit() or
     deflateInit2(), and after deflateSetHeader(), if used.  This would be used
     to allocate an output buffer for deflation in a single pass, and so would be
--- 780,12 ---
  
       deflateTune() can be called after deflateInit() or deflateInit2(), and
     returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
   */
  
! ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
!                                    uLong sourceLen);
  /*
       deflateBound() returns an upper bound on the compressed size after
     deflation of sourceLen bytes.  It must be called after deflateInit() or
     deflateInit2(), and after deflateSetHeader(), if used.  This would be used
     to allocate an output buffer for deflation in a single pass, and so would be

*** 794,13 ***
     to return Z_STREAM_END.  Note that it is possible for the compressed size to
     be larger than the value returned by deflateBound() if flush options other
     than Z_FINISH or Z_NO_FLUSH are used.
  */
  
! ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
!                                        unsigned *pending,
!                                        int *bits));
  /*
       deflatePending() returns the number of bytes and bits of output that have
     been generated, but not yet provided in the available output.  The bytes not
     provided would be due to the available output space having being consumed.
     The number of bits of output not provided are between 0 and 7, where they
--- 795,13 ---
     to return Z_STREAM_END.  Note that it is possible for the compressed size to
     be larger than the value returned by deflateBound() if flush options other
     than Z_FINISH or Z_NO_FLUSH are used.
  */
  
! ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
!                                    unsigned *pending,
!                                    int *bits);
  /*
       deflatePending() returns the number of bytes and bits of output that have
     been generated, but not yet provided in the available output.  The bytes not
     provided would be due to the available output space having being consumed.
     The number of bits of output not provided are between 0 and 7, where they

*** 809,13 ***
  
       deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
   */
  
! ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
!                                      int bits,
!                                      int value));
  /*
       deflatePrime() inserts bits in the deflate output stream.  The intent
     is that this function is used to start off the deflate output with the bits
     leftover from a previous deflate stream when appending to it.  As such, this
     function can only be used for raw deflate, and must be used before the first
--- 810,13 ---
  
       deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
   */
  
! ZEXTERN int ZEXPORT deflatePrime(z_streamp strm,
!                                  int bits,
!                                  int value);
  /*
       deflatePrime() inserts bits in the deflate output stream.  The intent
     is that this function is used to start off the deflate output with the bits
     leftover from a previous deflate stream when appending to it.  As such, this
     function can only be used for raw deflate, and must be used before the first

*** 826,12 ***
       deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
     room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
     source stream state was inconsistent.
  */
  
! ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
!                                          gz_headerp head));
  /*
       deflateSetHeader() provides gzip header information for when a gzip
     stream is requested by deflateInit2().  deflateSetHeader() may be called
     after deflateInit2() or deflateReset() and before the first call of
     deflate().  The text, time, os, extra field, name, and comment information
--- 827,12 ---
       deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
     room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
     source stream state was inconsistent.
  */
  
! ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
!                                      gz_headerp head);
  /*
       deflateSetHeader() provides gzip header information for when a gzip
     stream is requested by deflateInit2().  deflateSetHeader() may be called
     after deflateInit2() or deflateReset() and before the first call of
     deflate().  The text, time, os, extra field, name, and comment information

*** 843,20 ***
     the current versions of the command-line version of gzip (up through version
     1.3.x) do not support header crc's, and will report that it is a "multi-part
     gzip file" and give up.
  
       If deflateSetHeader is not used, the default gzip header has text false,
!    the time set to zero, and os set to 255, with no extra, name, or comment
!    fields.  The gzip header is returned to the default state by deflateReset().
  
       deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
  /*
! ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
!                                      int  windowBits));
  
       This is another version of inflateInit with an extra parameter.  The
     fields next_in, avail_in, zalloc, zfree and opaque must be initialized
     before by the caller.
  
--- 844,21 ---
     the current versions of the command-line version of gzip (up through version
     1.3.x) do not support header crc's, and will report that it is a "multi-part
     gzip file" and give up.
  
       If deflateSetHeader is not used, the default gzip header has text false,
!    the time set to zero, and os set to the current operating system, with no
!    extra, name, or comment fields.  The gzip header is returned to the default
+    state by deflateReset().
  
       deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
  /*
! ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
!                                  int windowBits);
  
       This is another version of inflateInit with an extra parameter.  The
     fields next_in, avail_in, zalloc, zfree and opaque must be initialized
     before by the caller.
  

*** 905,13 ***
     next_out and avail_out are unused and unchanged.) The current implementation
     of inflateInit2() does not process any header information -- that is
     deferred until inflate() is called.
  */
  
! ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
!                                              const Bytef *dictionary,
!                                              uInt  dictLength));
  /*
       Initializes the decompression dictionary from the given uncompressed byte
     sequence.  This function must be called immediately after a call of inflate,
     if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
     can be determined from the Adler-32 value returned by that call of inflate.
--- 907,13 ---
     next_out and avail_out are unused and unchanged.) The current implementation
     of inflateInit2() does not process any header information -- that is
     deferred until inflate() is called.
  */
  
! ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm,
!                                          const Bytef *dictionary,
!                                          uInt  dictLength);
  /*
       Initializes the decompression dictionary from the given uncompressed byte
     sequence.  This function must be called immediately after a call of inflate,
     if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
     can be determined from the Adler-32 value returned by that call of inflate.

*** 928,13 ***
     expected one (incorrect Adler-32 value).  inflateSetDictionary does not
     perform any decompression: this will be done by subsequent calls of
     inflate().
  */
  
! ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
!                                              Bytef *dictionary,
!                                              uInt  *dictLength));
  /*
       Returns the sliding dictionary being maintained by inflate.  dictLength is
     set to the number of bytes in the dictionary, and that many bytes are copied
     to dictionary.  dictionary must have enough space, where 32768 bytes is
     always enough.  If inflateGetDictionary() is called with dictionary equal to
--- 930,13 ---
     expected one (incorrect Adler-32 value).  inflateSetDictionary does not
     perform any decompression: this will be done by subsequent calls of
     inflate().
  */
  
! ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm,
!                                          Bytef *dictionary,
!                                          uInt  *dictLength);
  /*
       Returns the sliding dictionary being maintained by inflate.  dictLength is
     set to the number of bytes in the dictionary, and that many bytes are copied
     to dictionary.  dictionary must have enough space, where 32768 bytes is
     always enough.  If inflateGetDictionary() is called with dictionary equal to

*** 943,11 ***
  
       inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
     stream state is inconsistent.
  */
  
! ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
  /*
       Skips invalid compressed data until a possible full flush point (see above
     for the description of deflate with Z_FULL_FLUSH) can be found, or until all
     available input is skipped.  No output is provided.
  
--- 945,11 ---
  
       inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
     stream state is inconsistent.
  */
  
! ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
  /*
       Skips invalid compressed data until a possible full flush point (see above
     for the description of deflate with Z_FULL_FLUSH) can be found, or until all
     available input is skipped.  No output is provided.
  

*** 956,18 ***
     pattern are full flush points.
  
       inflateSync returns Z_OK if a possible full flush point has been found,
     Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
     has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
!    In the success case, the application may save the current current value of
!    total_in which indicates where valid compressed data was found.  In the
!    error case, the application may repeatedly call inflateSync, providing more
!    input each time, until success or end of the input data.
  */
  
! ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
!                                     z_streamp source));
  /*
       Sets the destination stream as a complete copy of the source stream.
  
       This function can be useful when randomly accessing a large stream.  The
     first pass through the stream can periodically record the inflate state,
--- 958,18 ---
     pattern are full flush points.
  
       inflateSync returns Z_OK if a possible full flush point has been found,
     Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
     has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
!    In the success case, the application may save the current value of total_in
!    which indicates where valid compressed data was found.  In the error case,
!    the application may repeatedly call inflateSync, providing more input each
!    time, until success or end of the input data.
  */
  
! ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
!                                 z_streamp source);
  /*
       Sets the destination stream as a complete copy of the source stream.
  
       This function can be useful when randomly accessing a large stream.  The
     first pass through the stream can periodically record the inflate state,

*** 978,22 ***
     enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
     (such as zalloc being Z_NULL).  msg is left unchanged in both source and
     destination.
  */
  
! ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
  /*
       This function is equivalent to inflateEnd followed by inflateInit,
     but does not free and reallocate the internal decompression state.  The
     stream will keep attributes that may have been set by inflateInit2.
  
       inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL).
  */
  
! ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
!                                       int windowBits));
  /*
       This function is the same as inflateReset, but it also permits changing
     the wrap and window size requests.  The windowBits parameter is interpreted
     the same as it is for inflateInit2.  If the window size is changed, then the
     memory allocated for the window is freed, and the window will be reallocated
--- 980,23 ---
     enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
     (such as zalloc being Z_NULL).  msg is left unchanged in both source and
     destination.
  */
  
! ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
  /*
       This function is equivalent to inflateEnd followed by inflateInit,
     but does not free and reallocate the internal decompression state.  The
     stream will keep attributes that may have been set by inflateInit2.
+    total_in, total_out, adler, and msg are initialized.
  
       inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL).
  */
  
! ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
!                                   int windowBits);
  /*
       This function is the same as inflateReset, but it also permits changing
     the wrap and window size requests.  The windowBits parameter is interpreted
     the same as it is for inflateInit2.  If the window size is changed, then the
     memory allocated for the window is freed, and the window will be reallocated

*** 1002,13 ***
       inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL), or if
     the windowBits parameter is invalid.
  */
  
! ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
!                                      int bits,
!                                      int value));
  /*
       This function inserts bits in the inflate input stream.  The intent is
     that this function is used to start inflating at a bit position in the
     middle of a byte.  The provided bits will be used before any bytes are used
     from next_in.  This function should only be used with raw inflate, and
--- 1005,13 ---
       inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent (such as zalloc or state being Z_NULL), or if
     the windowBits parameter is invalid.
  */
  
! ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
!                                  int bits,
!                                  int value);
  /*
       This function inserts bits in the inflate input stream.  The intent is
     that this function is used to start inflating at a bit position in the
     middle of a byte.  The provided bits will be used before any bytes are used
     from next_in.  This function should only be used with raw inflate, and

*** 1023,11 ***
  
       inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
! ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
  /*
       This function returns two values, one in the lower 16 bits of the return
     value, and the other in the remaining upper bits, obtained by shifting the
     return value down 16 bits.  If the upper value is -1 and the lower value is
     zero, then inflate() is currently decoding information outside of a block.
--- 1026,11 ---
  
       inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
! ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
  /*
       This function returns two values, one in the lower 16 bits of the return
     value, and the other in the remaining upper bits, obtained by shifting the
     return value down 16 bits.  If the upper value is -1 and the lower value is
     zero, then inflate() is currently decoding information outside of a block.

*** 1051,12 ***
  
       inflateMark returns the value noted above, or -65536 if the provided
     source stream state was inconsistent.
  */
  
! ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
!                                          gz_headerp head));
  /*
       inflateGetHeader() requests that gzip header information be stored in the
     provided gz_header structure.  inflateGetHeader() may be called after
     inflateInit2() or inflateReset(), and before the first call of inflate().
     As inflate() processes the gzip stream, head->done is zero until the header
--- 1054,12 ---
  
       inflateMark returns the value noted above, or -65536 if the provided
     source stream state was inconsistent.
  */
  
! ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
!                                      gz_headerp head);
  /*
       inflateGetHeader() requests that gzip header information be stored in the
     provided gz_header structure.  inflateGetHeader() may be called after
     inflateInit2() or inflateReset(), and before the first call of inflate().
     As inflate() processes the gzip stream, head->done is zero until the header

*** 1092,12 ***
       inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
  /*
! ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
!                                         unsigned char FAR *window));
  
       Initialize the internal stream state for decompression using inflateBack()
     calls.  The fields zalloc, zfree and opaque in strm must be initialized
     before the call.  If zalloc and zfree are Z_NULL, then the default library-
     derived memory allocation routines are used.  windowBits is the base two
--- 1095,12 ---
       inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
     stream state was inconsistent.
  */
  
  /*
! ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
!                                     unsigned char FAR *window);
  
       Initialize the internal stream state for decompression using inflateBack()
     calls.  The fields zalloc, zfree and opaque in strm must be initialized
     before the call.  If zalloc and zfree are Z_NULL, then the default library-
     derived memory allocation routines are used.  windowBits is the base two

*** 1113,17 ***
     the parameters are invalid, Z_MEM_ERROR if the internal state could not be
     allocated, or Z_VERSION_ERROR if the version of the library does not match
     the version of the header file.
  */
  
! typedef unsigned (*in_func) OF((void FAR *,
!                                 z_const unsigned char FAR * FAR *));
! typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
  
! ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
!                                     in_func in, void FAR *in_desc,
!                                     out_func out, void FAR *out_desc));
  /*
       inflateBack() does a raw inflate with a single call using a call-back
     interface for input and output.  This is potentially more efficient than
     inflate() for file i/o applications, in that it avoids copying between the
     output and the sliding window by simply making the window itself the output
--- 1116,17 ---
     the parameters are invalid, Z_MEM_ERROR if the internal state could not be
     allocated, or Z_VERSION_ERROR if the version of the library does not match
     the version of the header file.
  */
  
! typedef unsigned (*in_func)(void FAR *,
!                             z_const unsigned char FAR * FAR *);
! typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
  
! ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
!                                 in_func in, void FAR *in_desc,
!                                 out_func out, void FAR *out_desc);
  /*
       inflateBack() does a raw inflate with a single call using a call-back
     interface for input and output.  This is potentially more efficient than
     inflate() for file i/o applications, in that it avoids copying between the
     output and the sliding window by simply making the window itself the output

*** 1187,19 ***
     non-zero.  (in() will always be called before out(), so strm->next_in is
     assured to be defined if out() returns non-zero.)  Note that inflateBack()
     cannot return Z_OK.
  */
  
! ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
  /*
       All memory allocated by inflateBackInit() is freed.
  
       inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
     state was inconsistent.
  */
  
! ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
  /* Return flags indicating compile-time options.
  
      Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
       1.0: size of uInt
       3.2: size of uLong
--- 1190,19 ---
     non-zero.  (in() will always be called before out(), so strm->next_in is
     assured to be defined if out() returns non-zero.)  Note that inflateBack()
     cannot return Z_OK.
  */
  
! ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm);
  /*
       All memory allocated by inflateBackInit() is freed.
  
       inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
     state was inconsistent.
  */
  
! ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
  /* Return flags indicating compile-time options.
  
      Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
       1.0: size of uInt
       3.2: size of uLong

*** 1248,12 ***
     are assumed (compression level and memory usage, standard memory allocation
     functions).  The source code of these utility functions can be modified if
     you need special options.
  */
  
! ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
!                                  const Bytef *source, uLong sourceLen));
  /*
       Compresses the source buffer into the destination buffer.  sourceLen is
     the byte length of the source buffer.  Upon entry, destLen is the total size
     of the destination buffer, which must be at least the value returned by
     compressBound(sourceLen).  Upon exit, destLen is the actual size of the
--- 1251,12 ---
     are assumed (compression level and memory usage, standard memory allocation
     functions).  The source code of these utility functions can be modified if
     you need special options.
  */
  
! ZEXTERN int ZEXPORT compress(Bytef *dest,   uLongf *destLen,
!                              const Bytef *source, uLong sourceLen);
  /*
       Compresses the source buffer into the destination buffer.  sourceLen is
     the byte length of the source buffer.  Upon entry, destLen is the total size
     of the destination buffer, which must be at least the value returned by
     compressBound(sourceLen).  Upon exit, destLen is the actual size of the

*** 1263,13 ***
       compress returns Z_OK if success, Z_MEM_ERROR if there was not
     enough memory, Z_BUF_ERROR if there was not enough room in the output
     buffer.
  */
  
! ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
!                                   const Bytef *source, uLong sourceLen,
!                                   int level));
  /*
       Compresses the source buffer into the destination buffer.  The level
     parameter has the same meaning as in deflateInit.  sourceLen is the byte
     length of the source buffer.  Upon entry, destLen is the total size of the
     destination buffer, which must be at least the value returned by
--- 1266,13 ---
       compress returns Z_OK if success, Z_MEM_ERROR if there was not
     enough memory, Z_BUF_ERROR if there was not enough room in the output
     buffer.
  */
  
! ZEXTERN int ZEXPORT compress2(Bytef *dest,   uLongf *destLen,
!                               const Bytef *source, uLong sourceLen,
!                               int level);
  /*
       Compresses the source buffer into the destination buffer.  The level
     parameter has the same meaning as in deflateInit.  sourceLen is the byte
     length of the source buffer.  Upon entry, destLen is the total size of the
     destination buffer, which must be at least the value returned by

*** 1279,19 ***
       compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
     memory, Z_BUF_ERROR if there was not enough room in the output buffer,
     Z_STREAM_ERROR if the level parameter is invalid.
  */
  
! ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
  /*
       compressBound() returns an upper bound on the compressed size after
     compress() or compress2() on sourceLen bytes.  It would be used before a
     compress() or compress2() call to allocate the destination buffer.
  */
  
! ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
!                                    const Bytef *source, uLong sourceLen));
  /*
       Decompresses the source buffer into the destination buffer.  sourceLen is
     the byte length of the source buffer.  Upon entry, destLen is the total size
     of the destination buffer, which must be large enough to hold the entire
     uncompressed data.  (The size of the uncompressed data must have been saved
--- 1282,19 ---
       compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
     memory, Z_BUF_ERROR if there was not enough room in the output buffer,
     Z_STREAM_ERROR if the level parameter is invalid.
  */
  
! ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
  /*
       compressBound() returns an upper bound on the compressed size after
     compress() or compress2() on sourceLen bytes.  It would be used before a
     compress() or compress2() call to allocate the destination buffer.
  */
  
! ZEXTERN int ZEXPORT uncompress(Bytef *dest,   uLongf *destLen,
!                                const Bytef *source, uLong sourceLen);
  /*
       Decompresses the source buffer into the destination buffer.  sourceLen is
     the byte length of the source buffer.  Upon entry, destLen is the total size
     of the destination buffer, which must be large enough to hold the entire
     uncompressed data.  (The size of the uncompressed data must have been saved

*** 1304,12 ***
     buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
     the case where there is not enough room, uncompress() will fill the output
     buffer with the uncompressed data up to that point.
  */
  
! ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest,   uLongf *destLen,
!                                     const Bytef *source, uLong *sourceLen));
  /*
       Same as uncompress, except that sourceLen is a pointer, where the
     length of the source is *sourceLen.  On return, *sourceLen is the number of
     source bytes consumed.
  */
--- 1307,12 ---
     buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
     the case where there is not enough room, uncompress() will fill the output
     buffer with the uncompressed data up to that point.
  */
  
! ZEXTERN int ZEXPORT uncompress2(Bytef *dest,   uLongf *destLen,
!                                 const Bytef *source, uLong *sourceLen);
  /*
       Same as uncompress, except that sourceLen is a pointer, where the
     length of the source is *sourceLen.  On return, *sourceLen is the number of
     source bytes consumed.
  */

*** 1324,11 ***
  */
  
  typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
  
  /*
! ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
  
       Open the gzip (.gz) file at path for reading and decompressing, or
     compressing and writing.  The mode parameter is as in fopen ("rb" or "wb")
     but can also include a compression level ("wb9") or a strategy: 'f' for
     filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
--- 1327,11 ---
  */
  
  typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
  
  /*
! ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
  
       Open the gzip (.gz) file at path for reading and decompressing, or
     compressing and writing.  The mode parameter is as in fopen ("rb" or "wb")
     but can also include a compression level ("wb9") or a strategy: 'f' for
     filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",

*** 1361,11 ***
     specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
     errno can be checked to determine if the reason gzopen failed was that the
     file could not be opened.
  */
  
! ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
  /*
       Associate a gzFile with the file descriptor fd.  File descriptors are
     obtained from calls like open, dup, creat, pipe or fileno (if the file has
     been previously opened with fopen).  The mode parameter is as in gzopen.
  
--- 1364,11 ---
     specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
     errno can be checked to determine if the reason gzopen failed was that the
     file could not be opened.
  */
  
! ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
  /*
       Associate a gzFile with the file descriptor fd.  File descriptors are
     obtained from calls like open, dup, creat, pipe or fileno (if the file has
     been previously opened with fopen).  The mode parameter is as in gzopen.
  

*** 1384,11 ***
     provided, or '+' was provided), or if fd is -1.  The file descriptor is not
     used until the next gz* read, write, seek, or close operation, so gzdopen
     will not detect if fd is invalid (unless fd is -1).
  */
  
! ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
  /*
       Set the internal buffer size used by this library's functions for file to
     size.  The default buffer size is 8192 bytes.  This function must be called
     after gzopen() or gzdopen(), and before any other calls that read or write
     the file.  The buffer memory allocation is always deferred to the first read
--- 1387,11 ---
     provided, or '+' was provided), or if fd is -1.  The file descriptor is not
     used until the next gz* read, write, seek, or close operation, so gzdopen
     will not detect if fd is invalid (unless fd is -1).
  */
  
! ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
  /*
       Set the internal buffer size used by this library's functions for file to
     size.  The default buffer size is 8192 bytes.  This function must be called
     after gzopen() or gzdopen(), and before any other calls that read or write
     the file.  The buffer memory allocation is always deferred to the first read

*** 1400,22 ***
  
       gzbuffer() returns 0 on success, or -1 on failure, such as being called
     too late.
  */
  
! ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
  /*
       Dynamically update the compression level and strategy for file.  See the
     description of deflateInit2 for the meaning of these parameters. Previously
     provided data is flushed before applying the parameter changes.
  
       gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
     opened for writing, Z_ERRNO if there is an error writing the flushed data,
     or Z_MEM_ERROR if there is a memory allocation error.
  */
  
! ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
  /*
       Read and decompress up to len uncompressed bytes from file into buf.  If
     the input file is not in gzip format, gzread copies the given number of
     bytes into the buffer directly from the file.
  
--- 1403,22 ---
  
       gzbuffer() returns 0 on success, or -1 on failure, such as being called
     too late.
  */
  
! ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
  /*
       Dynamically update the compression level and strategy for file.  See the
     description of deflateInit2 for the meaning of these parameters. Previously
     provided data is flushed before applying the parameter changes.
  
       gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
     opened for writing, Z_ERRNO if there is an error writing the flushed data,
     or Z_MEM_ERROR if there is a memory allocation error.
  */
  
! ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
  /*
       Read and decompress up to len uncompressed bytes from file into buf.  If
     the input file is not in gzip format, gzread copies the given number of
     bytes into the buffer directly from the file.
  

*** 1441,12 ***
     len for end of file, or -1 for error.  If len is too large to fit in an int,
     then nothing is read, -1 is returned, and the error state is set to
     Z_STREAM_ERROR.
  */
  
! ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
!                                      gzFile file));
  /*
       Read and decompress up to nitems items of size size from file into buf,
     otherwise operating as gzread() does.  This duplicates the interface of
     stdio's fread(), with size_t request and return types.  If the library
     defines size_t, then z_size_t is identical to size_t.  If not, then z_size_t
--- 1444,12 ---
     len for end of file, or -1 for error.  If len is too large to fit in an int,
     then nothing is read, -1 is returned, and the error state is set to
     Z_STREAM_ERROR.
  */
  
! ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
!                                  gzFile file);
  /*
       Read and decompress up to nitems items of size size from file into buf,
     otherwise operating as gzread() does.  This duplicates the interface of
     stdio's fread(), with size_t request and return types.  If the library
     defines size_t, then z_size_t is identical to size_t.  If not, then z_size_t

*** 1467,18 ***
     is the same as the behavior of fread() implementations in common libraries,
     but it prevents the direct use of gzfread() to read a concurrently written
     file, resetting and retrying on end-of-file, when size is not 1.
  */
  
! ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));
  /*
       Compress and write the len uncompressed bytes at buf to file. gzwrite
     returns the number of uncompressed bytes written or 0 in case of error.
  */
  
! ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
!                                       z_size_t nitems, gzFile file));
  /*
       Compress and write nitems items of size size from buf to file, duplicating
     the interface of stdio's fwrite(), with size_t request and return types.  If
     the library defines size_t, then z_size_t is identical to size_t.  If not,
     then z_size_t is an unsigned integer type that can contain a pointer.
--- 1470,18 ---
     is the same as the behavior of fread() implementations in common libraries,
     but it prevents the direct use of gzfread() to read a concurrently written
     file, resetting and retrying on end-of-file, when size is not 1.
  */
  
! ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
  /*
       Compress and write the len uncompressed bytes at buf to file. gzwrite
     returns the number of uncompressed bytes written or 0 in case of error.
  */
  
! ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
!                                   z_size_t nitems, gzFile file);
  /*
       Compress and write nitems items of size size from buf to file, duplicating
     the interface of stdio's fwrite(), with size_t request and return types.  If
     the library defines size_t, then z_size_t is identical to size_t.  If not,
     then z_size_t is an unsigned integer type that can contain a pointer.

*** 1487,11 ***
     if there was an error.  If the multiplication of size and nitems overflows,
     i.e. the product does not fit in a z_size_t, then nothing is written, zero
     is returned, and the error state is set to Z_STREAM_ERROR.
  */
  
! ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
  /*
       Convert, format, compress, and write the arguments (...) to file under
     control of the string format, as in fprintf.  gzprintf returns the number of
     uncompressed bytes actually written, or a negative zlib error code in case
     of error.  The number of uncompressed bytes written is limited to 8191, or
--- 1490,11 ---
     if there was an error.  If the multiplication of size and nitems overflows,
     i.e. the product does not fit in a z_size_t, then nothing is written, zero
     is returned, and the error state is set to Z_STREAM_ERROR.
  */
  
! ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
  /*
       Convert, format, compress, and write the arguments (...) to file under
     control of the string format, as in fprintf.  gzprintf returns the number of
     uncompressed bytes actually written, or a negative zlib error code in case
     of error.  The number of uncompressed bytes written is limited to 8191, or

*** 1502,19 ***
     zlib was compiled with the insecure functions sprintf() or vsprintf(),
     because the secure snprintf() or vsnprintf() functions were not available.
     This can be determined using zlibCompileFlags().
  */
  
! ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
  /*
       Compress and write the given null-terminated string s to file, excluding
     the terminating null character.
  
       gzputs returns the number of characters written, or -1 in case of error.
  */
  
! ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
  /*
       Read and decompress bytes from file into buf, until len-1 characters are
     read, or until a newline character is read and transferred to buf, or an
     end-of-file condition is encountered.  If any characters are read or if len
     is one, the string is terminated with a null character.  If no characters
--- 1505,19 ---
     zlib was compiled with the insecure functions sprintf() or vsprintf(),
     because the secure snprintf() or vsnprintf() functions were not available.
     This can be determined using zlibCompileFlags().
  */
  
! ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
  /*
       Compress and write the given null-terminated string s to file, excluding
     the terminating null character.
  
       gzputs returns the number of characters written, or -1 in case of error.
  */
  
! ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
  /*
       Read and decompress bytes from file into buf, until len-1 characters are
     read, or until a newline character is read and transferred to buf, or an
     end-of-file condition is encountered.  If any characters are read or if len
     is one, the string is terminated with a null character.  If no characters

*** 1524,26 ***
       gzgets returns buf which is a null-terminated string, or it returns NULL
     for end-of-file or in case of error.  If there was an error, the contents at
     buf are indeterminate.
  */
  
! ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
  /*
       Compress and write c, converted to an unsigned char, into file.  gzputc
     returns the value that was written, or -1 in case of error.
  */
  
! ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
  /*
       Read and decompress one byte from file.  gzgetc returns this byte or -1
     in case of end of file or error.  This is implemented as a macro for speed.
     As such, it does not do all of the checking the other functions do.  I.e.
     it does not check to see if file is NULL, nor whether the structure file
     points to has been clobbered or not.
  */
  
! ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
  /*
       Push c back onto the stream for file to be read as the first character on
     the next read.  At least one character of push-back is always allowed.
     gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
     fail if c is -1, and may fail if a character has been pushed but not read
--- 1527,26 ---
       gzgets returns buf which is a null-terminated string, or it returns NULL
     for end-of-file or in case of error.  If there was an error, the contents at
     buf are indeterminate.
  */
  
! ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
  /*
       Compress and write c, converted to an unsigned char, into file.  gzputc
     returns the value that was written, or -1 in case of error.
  */
  
! ZEXTERN int ZEXPORT gzgetc(gzFile file);
  /*
       Read and decompress one byte from file.  gzgetc returns this byte or -1
     in case of end of file or error.  This is implemented as a macro for speed.
     As such, it does not do all of the checking the other functions do.  I.e.
     it does not check to see if file is NULL, nor whether the structure file
     points to has been clobbered or not.
  */
  
! ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
  /*
       Push c back onto the stream for file to be read as the first character on
     the next read.  At least one character of push-back is always allowed.
     gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
     fail if c is -1, and may fail if a character has been pushed but not read

*** 1551,11 ***
     output buffer size of pushed characters is allowed.  (See gzbuffer above.)
     The pushed character will be discarded if the stream is repositioned with
     gzseek() or gzrewind().
  */
  
! ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
  /*
       Flush all pending output to file.  The parameter flush is as in the
     deflate() function.  The return value is the zlib error number (see function
     gzerror below).  gzflush is only permitted when writing.
  
--- 1554,11 ---
     output buffer size of pushed characters is allowed.  (See gzbuffer above.)
     The pushed character will be discarded if the stream is repositioned with
     gzseek() or gzrewind().
  */
  
! ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
  /*
       Flush all pending output to file.  The parameter flush is as in the
     deflate() function.  The return value is the zlib error number (see function
     gzerror below).  gzflush is only permitted when writing.
  

*** 1567,12 ***
       gzflush should be called only when strictly necessary because it will
     degrade compression if called too often.
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
!                                    z_off_t offset, int whence));
  
       Set the starting position to offset relative to whence for the next gzread
     or gzwrite on file.  The offset represents a number of bytes in the
     uncompressed data stream.  The whence parameter is defined as in lseek(2);
     the value SEEK_END is not supported.
--- 1570,12 ---
       gzflush should be called only when strictly necessary because it will
     degrade compression if called too often.
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
!                                z_off_t offset, int whence);
  
       Set the starting position to offset relative to whence for the next gzread
     or gzwrite on file.  The offset represents a number of bytes in the
     uncompressed data stream.  The whence parameter is defined as in lseek(2);
     the value SEEK_END is not supported.

*** 1586,39 ***
     the beginning of the uncompressed stream, or -1 in case of error, in
     particular if the file is opened for writing and the new starting position
     would be before the current position.
  */
  
! ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
  /*
       Rewind file. This function is supported only for reading.
  
       gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
  
       Return the starting position for the next gzread or gzwrite on file.
     This position represents a number of bytes in the uncompressed data stream,
     and is zero when starting, even if appending or reading a gzip stream from
     the middle of a file using gzdopen().
  
       gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
  
       Return the current compressed (actual) read or write offset of file.  This
     offset includes the count of bytes that precede the gzip stream, for example
     when appending or when using gzdopen() for reading.  When reading, the
     offset does not include as yet unused buffered input.  This information can
     be used for a progress indicator.  On error, gzoffset() returns -1.
  */
  
! ZEXTERN int ZEXPORT gzeof OF((gzFile file));
  /*
       Return true (1) if the end-of-file indicator for file has been set while
     reading, false (0) otherwise.  Note that the end-of-file indicator is set
     only if the read tried to go past the end of the input, but came up short.
     Therefore, just like feof(), gzeof() may return false even if there is no
--- 1589,39 ---
     the beginning of the uncompressed stream, or -1 in case of error, in
     particular if the file is opened for writing and the new starting position
     would be before the current position.
  */
  
! ZEXTERN int ZEXPORT    gzrewind(gzFile file);
  /*
       Rewind file. This function is supported only for reading.
  
       gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT    gztell(gzFile file);
  
       Return the starting position for the next gzread or gzwrite on file.
     This position represents a number of bytes in the uncompressed data stream,
     and is zero when starting, even if appending or reading a gzip stream from
     the middle of a file using gzdopen().
  
       gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
  */
  
  /*
! ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
  
       Return the current compressed (actual) read or write offset of file.  This
     offset includes the count of bytes that precede the gzip stream, for example
     when appending or when using gzdopen() for reading.  When reading, the
     offset does not include as yet unused buffered input.  This information can
     be used for a progress indicator.  On error, gzoffset() returns -1.
  */
  
! ZEXTERN int ZEXPORT gzeof(gzFile file);
  /*
       Return true (1) if the end-of-file indicator for file has been set while
     reading, false (0) otherwise.  Note that the end-of-file indicator is set
     only if the read tried to go past the end of the input, but came up short.
     Therefore, just like feof(), gzeof() may return false even if there is no

*** 1629,11 ***
       If gzeof() returns true, then the read functions will return no more data,
     unless the end-of-file indicator is reset by gzclearerr() and the input file
     has grown since the previous end of file was detected.
  */
  
! ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
  /*
       Return true (1) if file is being copied directly while reading, or false
     (0) if file is a gzip stream being decompressed.
  
       If the input file is empty, gzdirect() will return true, since the input
--- 1632,11 ---
       If gzeof() returns true, then the read functions will return no more data,
     unless the end-of-file indicator is reset by gzclearerr() and the input file
     has grown since the previous end of file was detected.
  */
  
! ZEXTERN int ZEXPORT gzdirect(gzFile file);
  /*
       Return true (1) if file is being copied directly while reading, or false
     (0) if file is a gzip stream being decompressed.
  
       If the input file is empty, gzdirect() will return true, since the input

*** 1650,11 ***
     explicitly requested, so the application already knows the answer.  When
     linking statically, using gzdirect() will include all of the zlib code for
     gzip file reading and decompression, which may not be desired.)
  */
  
! ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
  /*
       Flush all pending output for file, if necessary, close file and
     deallocate the (de)compression state.  Note that once file is closed, you
     cannot call gzerror with file, since its structures have been deallocated.
     gzclose must not be called more than once on the same file, just as free
--- 1653,11 ---
     explicitly requested, so the application already knows the answer.  When
     linking statically, using gzdirect() will include all of the zlib code for
     gzip file reading and decompression, which may not be desired.)
  */
  
! ZEXTERN int ZEXPORT    gzclose(gzFile file);
  /*
       Flush all pending output for file, if necessary, close file and
     deallocate the (de)compression state.  Note that once file is closed, you
     cannot call gzerror with file, since its structures have been deallocated.
     gzclose must not be called more than once on the same file, just as free

*** 1663,23 ***
       gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
     file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
     last read ended in the middle of a gzip stream, or Z_OK on success.
  */
  
! ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
! ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
  /*
       Same as gzclose(), but gzclose_r() is only for use when reading, and
     gzclose_w() is only for use when writing or appending.  The advantage to
     using these instead of gzclose() is that they avoid linking in zlib
     compression or decompression code that is not used when only reading or only
     writing respectively.  If gzclose() is used, then both compression and
     decompression code will be included the application when linking to a static
     zlib library.
  */
  
! ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
  /*
       Return the error message for the last error which occurred on file.
     errnum is set to zlib error number.  If an error occurred in the file system
     and not in the compression library, errnum is set to Z_ERRNO and the
     application may consult errno to get the exact error code.
--- 1666,23 ---
       gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
     file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
     last read ended in the middle of a gzip stream, or Z_OK on success.
  */
  
! ZEXTERN int ZEXPORT gzclose_r(gzFile file);
! ZEXTERN int ZEXPORT gzclose_w(gzFile file);
  /*
       Same as gzclose(), but gzclose_r() is only for use when reading, and
     gzclose_w() is only for use when writing or appending.  The advantage to
     using these instead of gzclose() is that they avoid linking in zlib
     compression or decompression code that is not used when only reading or only
     writing respectively.  If gzclose() is used, then both compression and
     decompression code will be included the application when linking to a static
     zlib library.
  */
  
! ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
  /*
       Return the error message for the last error which occurred on file.
     errnum is set to zlib error number.  If an error occurred in the file system
     and not in the compression library, errnum is set to Z_ERRNO and the
     application may consult errno to get the exact error code.

*** 1691,11 ***
  
       gzerror() should be used to distinguish errors from end-of-file for those
     functions above that do not distinguish those cases in their return values.
  */
  
! ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
  /*
       Clear the error and end-of-file flags for file.  This is analogous to the
     clearerr() function in stdio.  This is useful for continuing to read a gzip
     file that is being written concurrently.
  */
--- 1694,11 ---
  
       gzerror() should be used to distinguish errors from end-of-file for those
     functions above that do not distinguish those cases in their return values.
  */
  
! ZEXTERN void ZEXPORT gzclearerr(gzFile file);
  /*
       Clear the error and end-of-file flags for file.  This is analogous to the
     clearerr() function in stdio.  This is useful for continuing to read a gzip
     file that is being written concurrently.
  */

*** 1708,11 ***
       These functions are not related to compression but are exported
     anyway because they might be useful in applications using the compression
     library.
  */
  
! ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
  /*
       Update a running Adler-32 checksum with the bytes buf[0..len-1] and
     return the updated checksum. An Adler-32 value is in the range of a 32-bit
     unsigned integer. If buf is Z_NULL, this function returns the required
     initial value for the checksum.
--- 1711,11 ---
       These functions are not related to compression but are exported
     anyway because they might be useful in applications using the compression
     library.
  */
  
! ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
  /*
       Update a running Adler-32 checksum with the bytes buf[0..len-1] and
     return the updated checksum. An Adler-32 value is in the range of a 32-bit
     unsigned integer. If buf is Z_NULL, this function returns the required
     initial value for the checksum.

*** 1728,29 ***
         adler = adler32(adler, buffer, length);
       }
       if (adler != original_adler) error();
  */
  
! ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
!                                     z_size_t len));
  /*
       Same as adler32(), but with a size_t length.
  */
  
  /*
! ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
!                                           z_off_t len2));
  
       Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
     and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
     each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
     seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
     that the z_off_t type (like off_t) is a signed integer.  If len2 is
     negative, the result has no meaning or utility.
  */
  
! ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
  /*
       Update a running CRC-32 with the bytes buf[0..len-1] and return the
     updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
     If buf is Z_NULL, this function returns the required initial value for the
     crc. Pre- and post-conditioning (one's complement) is performed within this
--- 1731,29 ---
         adler = adler32(adler, buffer, length);
       }
       if (adler != original_adler) error();
  */
  
! ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
!                                 z_size_t len);
  /*
       Same as adler32(), but with a size_t length.
  */
  
  /*
! ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
!                                       z_off_t len2);
  
       Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
     and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
     each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
     seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
     that the z_off_t type (like off_t) is a signed integer.  If len2 is
     negative, the result has no meaning or utility.
  */
  
! ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
  /*
       Update a running CRC-32 with the bytes buf[0..len-1] and return the
     updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
     If buf is Z_NULL, this function returns the required initial value for the
     crc. Pre- and post-conditioning (one's complement) is performed within this

*** 1764,34 ***
         crc = crc32(crc, buffer, length);
       }
       if (crc != original_crc) error();
  */
  
! ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
!                                   z_size_t len));
  /*
       Same as crc32(), but with a size_t length.
  */
  
  /*
! ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
  
       Combine two CRC-32 check values into one.  For two sequences of bytes,
     seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
     calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
     check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
!    len2.
  */
  
  /*
! ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
  
       Return the operator corresponding to length len2, to be used with
!    crc32_combine_op().
  */
  
! ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
  /*
       Give the same result as crc32_combine(), using op in place of len2. op is
     is generated from len2 by crc32_combine_gen(). This will be faster than
     crc32_combine() if the generated op is used more than once.
  */
--- 1767,34 ---
         crc = crc32(crc, buffer, length);
       }
       if (crc != original_crc) error();
  */
  
! ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
!                               z_size_t len);
  /*
       Same as crc32(), but with a size_t length.
  */
  
  /*
! ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
  
       Combine two CRC-32 check values into one.  For two sequences of bytes,
     seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
     calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
     check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
!    len2. len2 must be non-negative.
  */
  
  /*
! ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
  
       Return the operator corresponding to length len2, to be used with
!    crc32_combine_op(). len2 must be non-negative.
  */
  
! ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
  /*
       Give the same result as crc32_combine(), using op in place of len2. op is
     is generated from len2 by crc32_combine_gen(). This will be faster than
     crc32_combine() if the generated op is used more than once.
  */

*** 1800,24 ***
                          /* various hacks, don't look :) */
  
  /* deflateInit and inflateInit are macros to allow checking the zlib version
   * and the compiler's view of z_stream:
   */
! ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
!                                      const char *version, int stream_size));
! ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
!                                      const char *version, int stream_size));
! ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
!                                       int windowBits, int memLevel,
!                                       int strategy, const char *version,
!                                       int stream_size));
! ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
!                                       const char *version, int stream_size));
! ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
!                                          unsigned char FAR *window,
!                                          const char *version,
!                                          int stream_size));
  #ifdef Z_PREFIX_SET
  #  define z_deflateInit(strm, level) \
            deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
  #  define z_inflateInit(strm) \
            inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
--- 1803,24 ---
                          /* various hacks, don't look :) */
  
  /* deflateInit and inflateInit are macros to allow checking the zlib version
   * and the compiler's view of z_stream:
   */
! ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level,
!                                  const char *version, int stream_size);
! ZEXTERN int ZEXPORT inflateInit_(z_streamp strm,
!                                  const char *version, int stream_size);
! ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int  level, int  method,
!                                   int windowBits, int memLevel,
!                                   int strategy, const char *version,
!                                   int stream_size);
! ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int  windowBits,
!                                   const char *version, int stream_size);
! ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
!                                      unsigned char FAR *window,
!                                      const char *version,
!                                      int stream_size);
  #ifdef Z_PREFIX_SET
  #  define z_deflateInit(strm, level) \
            deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
  #  define z_inflateInit(strm) \
            inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))

*** 1858,11 ***
  struct gzFile_s {
      unsigned have;
      unsigned char *next;
      z_off64_t pos;
  };
! ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
  #ifdef Z_PREFIX_SET
  #  undef z_gzgetc
  #  define z_gzgetc(g) \
            ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
  #else
--- 1861,11 ---
  struct gzFile_s {
      unsigned have;
      unsigned char *next;
      z_off64_t pos;
  };
! ZEXTERN int ZEXPORT gzgetc_(gzFile file);       /* backward compatibility */
  #ifdef Z_PREFIX_SET
  #  undef z_gzgetc
  #  define z_gzgetc(g) \
            ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
  #else

*** 1875,17 ***
   * both are true, the application gets the *64 functions, and the regular
   * functions are changed to 64 bits) -- in case these are set on systems
   * without large file support, _LFS64_LARGEFILE must also be true
   */
  #ifdef Z_LARGE64
!    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
!    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
!    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
!    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
!    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
!    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
!    ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
  #endif
  
  #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
  #  ifdef Z_PREFIX_SET
  #    define z_gzopen z_gzopen64
--- 1878,17 ---
   * both are true, the application gets the *64 functions, and the regular
   * functions are changed to 64 bits) -- in case these are set on systems
   * without large file support, _LFS64_LARGEFILE must also be true
   */
  #ifdef Z_LARGE64
!    ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
!    ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
!    ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
!    ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
!    ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
!    ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
!    ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
  #endif
  
  #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
  #  ifdef Z_PREFIX_SET
  #    define z_gzopen z_gzopen64

*** 1903,54 ***
  #    define adler32_combine adler32_combine64
  #    define crc32_combine crc32_combine64
  #    define crc32_combine_gen crc32_combine_gen64
  #  endif
  #  ifndef Z_LARGE64
!      ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
!      ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
!      ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
!      ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
!      ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
!      ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
!      ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
  #  endif
  #else
!    ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
!    ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
!    ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
!    ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
!    ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
!    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
!    ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
  #endif
  
  #else /* Z_SOLO */
  
!    ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
!    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
!    ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
  
  #endif /* !Z_SOLO */
  
  /* undocumented functions */
! ZEXTERN const char   * ZEXPORT zError           OF((int));
! ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
! ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
! ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
! ZEXTERN int            ZEXPORT inflateValidate OF((z_streamp, int));
! ZEXTERN unsigned long  ZEXPORT inflateCodesUsed OF((z_streamp));
! ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
! ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
  #if defined(_WIN32) && !defined(Z_SOLO)
! ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
!                                             const char *mode));
  #endif
  #if defined(STDC) || defined(Z_HAVE_STDARG_H)
  #  ifndef Z_SOLO
! ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
!                                                   const char *format,
!                                                   va_list va));
  #  endif
  #endif
  
  #ifdef __cplusplus
  }
--- 1906,54 ---
  #    define adler32_combine adler32_combine64
  #    define crc32_combine crc32_combine64
  #    define crc32_combine_gen crc32_combine_gen64
  #  endif
  #  ifndef Z_LARGE64
!      ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
!      ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
!      ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
!      ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
!      ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
!      ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
!      ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
  #  endif
  #else
!    ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
!    ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
!    ZEXTERN z_off_t ZEXPORT gztell(gzFile);
!    ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
!    ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
!    ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
!    ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
  #endif
  
  #else /* Z_SOLO */
  
!    ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
!    ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
!    ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
  
  #endif /* !Z_SOLO */
  
  /* undocumented functions */
! ZEXTERN const char   * ZEXPORT zError(int);
! ZEXTERN int            ZEXPORT inflateSyncPoint(z_streamp);
! ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
! ZEXTERN int            ZEXPORT inflateUndermine(z_streamp, int);
! ZEXTERN int            ZEXPORT inflateValidate(z_streamp, int);
! ZEXTERN unsigned long  ZEXPORT inflateCodesUsed(z_streamp);
! ZEXTERN int            ZEXPORT inflateResetKeep(z_streamp);
! ZEXTERN int            ZEXPORT deflateResetKeep(z_streamp);
  #if defined(_WIN32) && !defined(Z_SOLO)
! ZEXTERN gzFile         ZEXPORT gzopen_w(const wchar_t *path,
!                                         const char *mode);
  #endif
  #if defined(STDC) || defined(Z_HAVE_STDARG_H)
  #  ifndef Z_SOLO
! ZEXTERN int            ZEXPORTVA gzvprintf(gzFile file,
!                                            const char *format,
!                                            va_list va);
  #  endif
  #endif
  
  #ifdef __cplusplus
  }
< prev index next >