zstdlib 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +16 -0
  3. data/Rakefile +1 -1
  4. data/ext/zstdlib_c/extconf.rb +9 -4
  5. data/ext/zstdlib_c/ruby/zlib-3.3/zstdlib.c +5090 -0
  6. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/adler32.c +5 -27
  7. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/compress.c +5 -16
  8. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.c +94 -161
  9. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.c +362 -434
  10. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.h +43 -12
  11. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzclose.c +1 -3
  12. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzguts.h +13 -18
  13. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzlib.c +28 -85
  14. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzread.c +23 -73
  15. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzwrite.c +19 -65
  16. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/infback.c +17 -30
  17. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.c +1 -4
  18. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.h +1 -1
  19. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.c +36 -102
  20. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.c +6 -11
  21. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.h +6 -6
  22. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.c +290 -355
  23. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/uncompr.c +4 -12
  24. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zconf.h +23 -14
  25. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zlib.h +202 -199
  26. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.c +18 -44
  27. data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.h +13 -33
  28. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/allocations.h +1 -1
  29. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/bitstream.h +49 -29
  30. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/compiler.h +114 -22
  31. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/cpu.h +36 -0
  32. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/debug.c +6 -0
  33. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/debug.h +20 -11
  34. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/error_private.h +45 -36
  35. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/fse.h +3 -2
  36. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/fse_decompress.c +19 -17
  37. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/huf.h +14 -1
  38. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/mem.h +0 -9
  39. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/pool.c +1 -1
  40. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/pool.h +1 -1
  41. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/portability_macros.h +2 -0
  42. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/threading.c +8 -2
  43. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/xxhash.c +5 -11
  44. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/xxhash.h +2341 -1007
  45. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_internal.h +5 -5
  46. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/fse_compress.c +8 -7
  47. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/huf_compress.c +54 -25
  48. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress.c +282 -161
  49. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_internal.h +29 -27
  50. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_superblock.c +224 -113
  51. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_cwksp.h +19 -13
  52. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_double_fast.c +17 -5
  53. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_double_fast.h +11 -0
  54. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_fast.c +14 -6
  55. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_lazy.c +129 -87
  56. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_lazy.h +103 -28
  57. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm.c +8 -2
  58. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_opt.c +216 -112
  59. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_opt.h +31 -7
  60. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstdmt_compress.c +94 -79
  61. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/huf_decompress.c +188 -126
  62. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/huf_decompress_amd64.S +38 -19
  63. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress.c +84 -32
  64. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_block.c +231 -208
  65. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_block.h +1 -1
  66. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_decompress_internal.h +2 -0
  67. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zstd.h +129 -60
  68. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzclose.c +1 -3
  69. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzlib.c +20 -73
  70. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzread.c +17 -58
  71. data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzwrite.c +18 -58
  72. metadata +104 -103
  73. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.h +0 -0
  74. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffixed.h +0 -0
  75. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.h +0 -0
  76. /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.h +0 -0
  77. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/bits.h +0 -0
  78. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/entropy_common.c +0 -0
  79. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/error_private.c +0 -0
  80. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/threading.h +0 -0
  81. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_common.c +0 -0
  82. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_deps.h +0 -0
  83. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/common/zstd_trace.h +0 -0
  84. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/clevels.h +0 -0
  85. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/hist.c +0 -0
  86. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/hist.h +0 -0
  87. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_literals.c +0 -0
  88. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_literals.h +0 -0
  89. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_sequences.c +0 -0
  90. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_sequences.h +0 -0
  91. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_compress_superblock.h +0 -0
  92. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_fast.h +0 -0
  93. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm.h +0 -0
  94. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstd_ldm_geartab.h +0 -0
  95. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/compress/zstdmt_compress.h +0 -0
  96. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_ddict.c +0 -0
  97. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/decompress/zstd_ddict.h +0 -0
  98. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zdict.h +0 -0
  99. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/lib/zstd_errors.h +0 -0
  100. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzcompatibility.h +0 -0
  101. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/gzguts.h +0 -0
  102. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/zstd_zlibwrapper.c +0 -0
  103. /data/ext/zstdlib_c/{zstd-1.5.5 → zstd-1.5.6}/zlibWrapper/zstd_zlibwrapper.h +0 -0
@@ -1,7 +1,7 @@
1
1
  /* zlib.h -- interface of the 'zlib' general purpose compression library
2
- version 1.2.12, March 11th, 2022
2
+ version 1.3.1, January 22nd, 2024
3
3
 
4
- Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
4
+ Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
5
5
 
6
6
  This software is provided 'as-is', without any express or implied
7
7
  warranty. In no event will the authors be held liable for any damages
@@ -37,11 +37,11 @@
37
37
  extern "C" {
38
38
  #endif
39
39
 
40
- #define ZLIB_VERSION "1.2.12"
41
- #define ZLIB_VERNUM 0x12c0
40
+ #define ZLIB_VERSION "1.3.1"
41
+ #define ZLIB_VERNUM 0x1310
42
42
  #define ZLIB_VER_MAJOR 1
43
- #define ZLIB_VER_MINOR 2
44
- #define ZLIB_VER_REVISION 12
43
+ #define ZLIB_VER_MINOR 3
44
+ #define ZLIB_VER_REVISION 1
45
45
  #define ZLIB_VER_SUBREVISION 0
46
46
 
47
47
  /*
@@ -78,8 +78,8 @@ extern "C" {
78
78
  even in the case of corrupted input.
79
79
  */
80
80
 
81
- typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
82
- typedef void (*free_func) OF((voidpf opaque, voidpf address));
81
+ typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
82
+ typedef void (*free_func)(voidpf opaque, voidpf address);
83
83
 
84
84
  struct internal_state;
85
85
 
@@ -217,7 +217,7 @@ typedef gz_header FAR *gz_headerp;
217
217
 
218
218
  /* basic functions */
219
219
 
220
- ZEXTERN const char * ZEXPORT zlibVersion OF((void));
220
+ ZEXTERN const char * ZEXPORT zlibVersion(void);
221
221
  /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
222
222
  If the first character differs, the library code actually used is not
223
223
  compatible with the zlib.h header file used by the application. This check
@@ -225,12 +225,12 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void));
225
225
  */
226
226
 
227
227
  /*
228
- ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
228
+ ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
229
229
 
230
230
  Initializes the internal stream state for compression. The fields
231
231
  zalloc, zfree and opaque must be initialized before by the caller. If
232
232
  zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
233
- allocation functions.
233
+ allocation functions. total_in, total_out, adler, and msg are initialized.
234
234
 
235
235
  The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
236
236
  1 gives best speed, 9 gives best compression, 0 gives no compression at all
@@ -247,7 +247,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
247
247
  */
248
248
 
249
249
 
250
- ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
250
+ ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
251
251
  /*
252
252
  deflate compresses as much data as possible, and stops when the input
253
253
  buffer becomes empty or the output buffer becomes full. It may introduce
@@ -276,7 +276,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
276
276
  == 0), or after each call of deflate(). If deflate returns Z_OK and with
277
277
  zero avail_out, it must be called again after making room in the output
278
278
  buffer because there might be more output pending. See deflatePending(),
279
- which can be used if desired to determine whether or not there is more ouput
279
+ which can be used if desired to determine whether or not there is more output
280
280
  in that case.
281
281
 
282
282
  Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
@@ -320,8 +320,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
320
320
  with the same value of the flush parameter and more output space (updated
321
321
  avail_out), until the flush is complete (deflate returns with non-zero
322
322
  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
323
- avail_out is greater than six to avoid repeated flush markers due to
324
- avail_out == 0 on return.
323
+ avail_out is greater than six when the flush marker begins, in order to avoid
324
+ repeated flush markers upon calling deflate() again when avail_out == 0.
325
325
 
326
326
  If the parameter flush is set to Z_FINISH, pending input is processed,
327
327
  pending output is flushed and deflate returns with Z_STREAM_END if there was
@@ -360,7 +360,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
360
360
  */
361
361
 
362
362
 
363
- ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
363
+ ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
364
364
  /*
365
365
  All dynamically allocated data structures for this stream are freed.
366
366
  This function discards any unprocessed input and does not flush any pending
@@ -375,7 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
375
375
 
376
376
 
377
377
  /*
378
- ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
378
+ ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
379
379
 
380
380
  Initializes the internal stream state for decompression. The fields
381
381
  next_in, avail_in, zalloc, zfree and opaque must be initialized before by
@@ -383,7 +383,8 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
383
383
  read or consumed. The allocation of a sliding window will be deferred to
384
384
  the first call of inflate (if the decompression does not complete on the
385
385
  first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
386
- them to use default allocation functions.
386
+ them to use default allocation functions. total_in, total_out, adler, and
387
+ msg are initialized.
387
388
 
388
389
  inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
389
390
  memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
@@ -397,7 +398,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
397
398
  */
398
399
 
399
400
 
400
- ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
401
+ ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
401
402
  /*
402
403
  inflate decompresses as much data as possible, and stops when the input
403
404
  buffer becomes empty or the output buffer becomes full. It may introduce
@@ -517,7 +518,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
517
518
  */
518
519
 
519
520
 
520
- ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
521
+ ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
521
522
  /*
522
523
  All dynamically allocated data structures for this stream are freed.
523
524
  This function discards any unprocessed input and does not flush any pending
@@ -535,12 +536,12 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
535
536
  */
536
537
 
537
538
  /*
538
- ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
539
- int level,
540
- int method,
541
- int windowBits,
542
- int memLevel,
543
- int strategy));
539
+ ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
540
+ int level,
541
+ int method,
542
+ int windowBits,
543
+ int memLevel,
544
+ int strategy);
544
545
 
545
546
  This is another version of deflateInit with more compression options. The
546
547
  fields zalloc, zfree and opaque must be initialized before by the caller.
@@ -607,9 +608,9 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
607
608
  compression: this will be done by deflate().
608
609
  */
609
610
 
610
- ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
611
- const Bytef *dictionary,
612
- uInt dictLength));
611
+ ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm,
612
+ const Bytef *dictionary,
613
+ uInt dictLength);
613
614
  /*
614
615
  Initializes the compression dictionary from the given byte sequence
615
616
  without producing any compressed output. When using the zlib format, this
@@ -651,16 +652,16 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
651
652
  not perform any compression: this will be done by deflate().
652
653
  */
653
654
 
654
- ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
655
- Bytef *dictionary,
656
- uInt *dictLength));
655
+ ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm,
656
+ Bytef *dictionary,
657
+ uInt *dictLength);
657
658
  /*
658
659
  Returns the sliding dictionary being maintained by deflate. dictLength is
659
660
  set to the number of bytes in the dictionary, and that many bytes are copied
660
661
  to dictionary. dictionary must have enough space, where 32768 bytes is
661
662
  always enough. If deflateGetDictionary() is called with dictionary equal to
662
663
  Z_NULL, then only the dictionary length is returned, and nothing is copied.
663
- Similary, if dictLength is Z_NULL, then it is not set.
664
+ Similarly, if dictLength is Z_NULL, then it is not set.
664
665
 
665
666
  deflateGetDictionary() may return a length less than the window size, even
666
667
  when more than the window size in input has been provided. It may return up
@@ -673,8 +674,8 @@ ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
673
674
  stream state is inconsistent.
674
675
  */
675
676
 
676
- ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
677
- z_streamp source));
677
+ ZEXTERN int ZEXPORT deflateCopy(z_streamp dest,
678
+ z_streamp source);
678
679
  /*
679
680
  Sets the destination stream as a complete copy of the source stream.
680
681
 
@@ -691,20 +692,20 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
691
692
  destination.
692
693
  */
693
694
 
694
- ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
695
+ ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
695
696
  /*
696
697
  This function is equivalent to deflateEnd followed by deflateInit, but
697
698
  does not free and reallocate the internal compression state. The stream
698
699
  will leave the compression level and any other attributes that may have been
699
- set unchanged.
700
+ set unchanged. total_in, total_out, adler, and msg are initialized.
700
701
 
701
702
  deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
702
703
  stream state was inconsistent (such as zalloc or state being Z_NULL).
703
704
  */
704
705
 
705
- ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
706
- int level,
707
- int strategy));
706
+ ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
707
+ int level,
708
+ int strategy);
708
709
  /*
709
710
  Dynamically update the compression level and compression strategy. The
710
711
  interpretation of level and strategy is as in deflateInit2(). This can be
@@ -729,7 +730,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
729
730
  Then no more input data should be provided before the deflateParams() call.
730
731
  If this is done, the old level and strategy will be applied to the data
731
732
  compressed before deflateParams(), and the new level and strategy will be
732
- applied to the the data compressed after deflateParams().
733
+ applied to the data compressed after deflateParams().
733
734
 
734
735
  deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
735
736
  state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
@@ -740,11 +741,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
740
741
  retried with more output space.
741
742
  */
742
743
 
743
- ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
744
- int good_length,
745
- int max_lazy,
746
- int nice_length,
747
- int max_chain));
744
+ ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
745
+ int good_length,
746
+ int max_lazy,
747
+ int nice_length,
748
+ int max_chain);
748
749
  /*
749
750
  Fine tune deflate's internal compression parameters. This should only be
750
751
  used by someone who understands the algorithm used by zlib's deflate for
@@ -757,8 +758,8 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
757
758
  returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
758
759
  */
759
760
 
760
- ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
761
- uLong sourceLen));
761
+ ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
762
+ uLong sourceLen);
762
763
  /*
763
764
  deflateBound() returns an upper bound on the compressed size after
764
765
  deflation of sourceLen bytes. It must be called after deflateInit() or
@@ -772,9 +773,9 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
772
773
  than Z_FINISH or Z_NO_FLUSH are used.
773
774
  */
774
775
 
775
- ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
776
- unsigned *pending,
777
- int *bits));
776
+ ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
777
+ unsigned *pending,
778
+ int *bits);
778
779
  /*
779
780
  deflatePending() returns the number of bytes and bits of output that have
780
781
  been generated, but not yet provided in the available output. The bytes not
@@ -787,9 +788,9 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
787
788
  stream state was inconsistent.
788
789
  */
789
790
 
790
- ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
791
- int bits,
792
- int value));
791
+ ZEXTERN int ZEXPORT deflatePrime(z_streamp strm,
792
+ int bits,
793
+ int value);
793
794
  /*
794
795
  deflatePrime() inserts bits in the deflate output stream. The intent
795
796
  is that this function is used to start off the deflate output with the bits
@@ -804,8 +805,8 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
804
805
  source stream state was inconsistent.
805
806
  */
806
807
 
807
- ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
808
- gz_headerp head));
808
+ ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
809
+ gz_headerp head);
809
810
  /*
810
811
  deflateSetHeader() provides gzip header information for when a gzip
811
812
  stream is requested by deflateInit2(). deflateSetHeader() may be called
@@ -821,16 +822,17 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
821
822
  gzip file" and give up.
822
823
 
823
824
  If deflateSetHeader is not used, the default gzip header has text false,
824
- the time set to zero, and os set to 255, with no extra, name, or comment
825
- fields. The gzip header is returned to the default state by deflateReset().
825
+ the time set to zero, and os set to the current operating system, with no
826
+ extra, name, or comment fields. The gzip header is returned to the default
827
+ state by deflateReset().
826
828
 
827
829
  deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
828
830
  stream state was inconsistent.
829
831
  */
830
832
 
831
833
  /*
832
- ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
833
- int windowBits));
834
+ ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
835
+ int windowBits);
834
836
 
835
837
  This is another version of inflateInit with an extra parameter. The
836
838
  fields next_in, avail_in, zalloc, zfree and opaque must be initialized
@@ -883,9 +885,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
883
885
  deferred until inflate() is called.
884
886
  */
885
887
 
886
- ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
887
- const Bytef *dictionary,
888
- uInt dictLength));
888
+ ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm,
889
+ const Bytef *dictionary,
890
+ uInt dictLength);
889
891
  /*
890
892
  Initializes the decompression dictionary from the given uncompressed byte
891
893
  sequence. This function must be called immediately after a call of inflate,
@@ -906,22 +908,22 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
906
908
  inflate().
907
909
  */
908
910
 
909
- ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
910
- Bytef *dictionary,
911
- uInt *dictLength));
911
+ ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm,
912
+ Bytef *dictionary,
913
+ uInt *dictLength);
912
914
  /*
913
915
  Returns the sliding dictionary being maintained by inflate. dictLength is
914
916
  set to the number of bytes in the dictionary, and that many bytes are copied
915
917
  to dictionary. dictionary must have enough space, where 32768 bytes is
916
918
  always enough. If inflateGetDictionary() is called with dictionary equal to
917
919
  Z_NULL, then only the dictionary length is returned, and nothing is copied.
918
- Similary, if dictLength is Z_NULL, then it is not set.
920
+ Similarly, if dictLength is Z_NULL, then it is not set.
919
921
 
920
922
  inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
921
923
  stream state is inconsistent.
922
924
  */
923
925
 
924
- ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
926
+ ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
925
927
  /*
926
928
  Skips invalid compressed data until a possible full flush point (see above
927
929
  for the description of deflate with Z_FULL_FLUSH) can be found, or until all
@@ -934,14 +936,14 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
934
936
  inflateSync returns Z_OK if a possible full flush point has been found,
935
937
  Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
936
938
  has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
937
- In the success case, the application may save the current current value of
938
- total_in which indicates where valid compressed data was found. In the
939
- error case, the application may repeatedly call inflateSync, providing more
940
- input each time, until success or end of the input data.
939
+ In the success case, the application may save the current value of total_in
940
+ which indicates where valid compressed data was found. In the error case,
941
+ the application may repeatedly call inflateSync, providing more input each
942
+ time, until success or end of the input data.
941
943
  */
942
944
 
943
- ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
944
- z_streamp source));
945
+ ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
946
+ z_streamp source);
945
947
  /*
946
948
  Sets the destination stream as a complete copy of the source stream.
947
949
 
@@ -956,18 +958,19 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
956
958
  destination.
957
959
  */
958
960
 
959
- ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
961
+ ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
960
962
  /*
961
963
  This function is equivalent to inflateEnd followed by inflateInit,
962
964
  but does not free and reallocate the internal decompression state. The
963
965
  stream will keep attributes that may have been set by inflateInit2.
966
+ total_in, total_out, adler, and msg are initialized.
964
967
 
965
968
  inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
966
969
  stream state was inconsistent (such as zalloc or state being Z_NULL).
967
970
  */
968
971
 
969
- ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
970
- int windowBits));
972
+ ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
973
+ int windowBits);
971
974
  /*
972
975
  This function is the same as inflateReset, but it also permits changing
973
976
  the wrap and window size requests. The windowBits parameter is interpreted
@@ -980,9 +983,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
980
983
  the windowBits parameter is invalid.
981
984
  */
982
985
 
983
- ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
984
- int bits,
985
- int value));
986
+ ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
987
+ int bits,
988
+ int value);
986
989
  /*
987
990
  This function inserts bits in the inflate input stream. The intent is
988
991
  that this function is used to start inflating at a bit position in the
@@ -1001,7 +1004,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
1001
1004
  stream state was inconsistent.
1002
1005
  */
1003
1006
 
1004
- ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
1007
+ ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
1005
1008
  /*
1006
1009
  This function returns two values, one in the lower 16 bits of the return
1007
1010
  value, and the other in the remaining upper bits, obtained by shifting the
@@ -1029,8 +1032,8 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
1029
1032
  source stream state was inconsistent.
1030
1033
  */
1031
1034
 
1032
- ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
1033
- gz_headerp head));
1035
+ ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
1036
+ gz_headerp head);
1034
1037
  /*
1035
1038
  inflateGetHeader() requests that gzip header information be stored in the
1036
1039
  provided gz_header structure. inflateGetHeader() may be called after
@@ -1070,8 +1073,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
1070
1073
  */
1071
1074
 
1072
1075
  /*
1073
- ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
1074
- unsigned char FAR *window));
1076
+ ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
1077
+ unsigned char FAR *window);
1075
1078
 
1076
1079
  Initialize the internal stream state for decompression using inflateBack()
1077
1080
  calls. The fields zalloc, zfree and opaque in strm must be initialized
@@ -1091,13 +1094,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
1091
1094
  the version of the header file.
1092
1095
  */
1093
1096
 
1094
- typedef unsigned (*in_func) OF((void FAR *,
1095
- z_const unsigned char FAR * FAR *));
1096
- typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
1097
+ typedef unsigned (*in_func)(void FAR *,
1098
+ z_const unsigned char FAR * FAR *);
1099
+ typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
1097
1100
 
1098
- ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1099
- in_func in, void FAR *in_desc,
1100
- out_func out, void FAR *out_desc));
1101
+ ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
1102
+ in_func in, void FAR *in_desc,
1103
+ out_func out, void FAR *out_desc);
1101
1104
  /*
1102
1105
  inflateBack() does a raw inflate with a single call using a call-back
1103
1106
  interface for input and output. This is potentially more efficient than
@@ -1165,7 +1168,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1165
1168
  cannot return Z_OK.
1166
1169
  */
1167
1170
 
1168
- ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
1171
+ ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm);
1169
1172
  /*
1170
1173
  All memory allocated by inflateBackInit() is freed.
1171
1174
 
@@ -1173,7 +1176,7 @@ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
1173
1176
  state was inconsistent.
1174
1177
  */
1175
1178
 
1176
- ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
1179
+ ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
1177
1180
  /* Return flags indicating compile-time options.
1178
1181
 
1179
1182
  Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
@@ -1226,8 +1229,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
1226
1229
  you need special options.
1227
1230
  */
1228
1231
 
1229
- ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
1230
- const Bytef *source, uLong sourceLen));
1232
+ ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
1233
+ const Bytef *source, uLong sourceLen);
1231
1234
  /*
1232
1235
  Compresses the source buffer into the destination buffer. sourceLen is
1233
1236
  the byte length of the source buffer. Upon entry, destLen is the total size
@@ -1241,9 +1244,9 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
1241
1244
  buffer.
1242
1245
  */
1243
1246
 
1244
- ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
1245
- const Bytef *source, uLong sourceLen,
1246
- int level));
1247
+ ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
1248
+ const Bytef *source, uLong sourceLen,
1249
+ int level);
1247
1250
  /*
1248
1251
  Compresses the source buffer into the destination buffer. The level
1249
1252
  parameter has the same meaning as in deflateInit. sourceLen is the byte
@@ -1257,15 +1260,15 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
1257
1260
  Z_STREAM_ERROR if the level parameter is invalid.
1258
1261
  */
1259
1262
 
1260
- ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
1263
+ ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
1261
1264
  /*
1262
1265
  compressBound() returns an upper bound on the compressed size after
1263
1266
  compress() or compress2() on sourceLen bytes. It would be used before a
1264
1267
  compress() or compress2() call to allocate the destination buffer.
1265
1268
  */
1266
1269
 
1267
- ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
1268
- const Bytef *source, uLong sourceLen));
1270
+ ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
1271
+ const Bytef *source, uLong sourceLen);
1269
1272
  /*
1270
1273
  Decompresses the source buffer into the destination buffer. sourceLen is
1271
1274
  the byte length of the source buffer. Upon entry, destLen is the total size
@@ -1282,8 +1285,8 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
1282
1285
  buffer with the uncompressed data up to that point.
1283
1286
  */
1284
1287
 
1285
- ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
1286
- const Bytef *source, uLong *sourceLen));
1288
+ ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
1289
+ const Bytef *source, uLong *sourceLen);
1287
1290
  /*
1288
1291
  Same as uncompress, except that sourceLen is a pointer, where the
1289
1292
  length of the source is *sourceLen. On return, *sourceLen is the number of
@@ -1302,7 +1305,7 @@ ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
1302
1305
  typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
1303
1306
 
1304
1307
  /*
1305
- ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
1308
+ ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
1306
1309
 
1307
1310
  Open the gzip (.gz) file at path for reading and decompressing, or
1308
1311
  compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
@@ -1339,7 +1342,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
1339
1342
  file could not be opened.
1340
1343
  */
1341
1344
 
1342
- ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
1345
+ ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
1343
1346
  /*
1344
1347
  Associate a gzFile with the file descriptor fd. File descriptors are
1345
1348
  obtained from calls like open, dup, creat, pipe or fileno (if the file has
@@ -1362,7 +1365,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
1362
1365
  will not detect if fd is invalid (unless fd is -1).
1363
1366
  */
1364
1367
 
1365
- ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1368
+ ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
1366
1369
  /*
1367
1370
  Set the internal buffer size used by this library's functions for file to
1368
1371
  size. The default buffer size is 8192 bytes. This function must be called
@@ -1378,7 +1381,7 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1378
1381
  too late.
1379
1382
  */
1380
1383
 
1381
- ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
1384
+ ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
1382
1385
  /*
1383
1386
  Dynamically update the compression level and strategy for file. See the
1384
1387
  description of deflateInit2 for the meaning of these parameters. Previously
@@ -1389,7 +1392,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
1389
1392
  or Z_MEM_ERROR if there is a memory allocation error.
1390
1393
  */
1391
1394
 
1392
- ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
1395
+ ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
1393
1396
  /*
1394
1397
  Read and decompress up to len uncompressed bytes from file into buf. If
1395
1398
  the input file is not in gzip format, gzread copies the given number of
@@ -1419,8 +1422,8 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
1419
1422
  Z_STREAM_ERROR.
1420
1423
  */
1421
1424
 
1422
- ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
1423
- gzFile file));
1425
+ ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
1426
+ gzFile file);
1424
1427
  /*
1425
1428
  Read and decompress up to nitems items of size size from file into buf,
1426
1429
  otherwise operating as gzread() does. This duplicates the interface of
@@ -1437,22 +1440,22 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
1437
1440
 
1438
1441
  In the event that the end of file is reached and only a partial item is
1439
1442
  available at the end, i.e. the remaining uncompressed data length is not a
1440
- multiple of size, then the final partial item is nevetheless read into buf
1443
+ multiple of size, then the final partial item is nevertheless read into buf
1441
1444
  and the end-of-file flag is set. The length of the partial item read is not
1442
1445
  provided, but could be inferred from the result of gztell(). This behavior
1443
1446
  is the same as the behavior of fread() implementations in common libraries,
1444
1447
  but it prevents the direct use of gzfread() to read a concurrently written
1445
- file, reseting and retrying on end-of-file, when size is not 1.
1448
+ file, resetting and retrying on end-of-file, when size is not 1.
1446
1449
  */
1447
1450
 
1448
- ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));
1451
+ ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
1449
1452
  /*
1450
1453
  Compress and write the len uncompressed bytes at buf to file. gzwrite
1451
1454
  returns the number of uncompressed bytes written or 0 in case of error.
1452
1455
  */
1453
1456
 
1454
- ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
1455
- z_size_t nitems, gzFile file));
1457
+ ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
1458
+ z_size_t nitems, gzFile file);
1456
1459
  /*
1457
1460
  Compress and write nitems items of size size from buf to file, duplicating
1458
1461
  the interface of stdio's fwrite(), with size_t request and return types. If
@@ -1465,7 +1468,7 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
1465
1468
  is returned, and the error state is set to Z_STREAM_ERROR.
1466
1469
  */
1467
1470
 
1468
- ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
1471
+ ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
1469
1472
  /*
1470
1473
  Convert, format, compress, and write the arguments (...) to file under
1471
1474
  control of the string format, as in fprintf. gzprintf returns the number of
@@ -1480,7 +1483,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
1480
1483
  This can be determined using zlibCompileFlags().
1481
1484
  */
1482
1485
 
1483
- ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
1486
+ ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
1484
1487
  /*
1485
1488
  Compress and write the given null-terminated string s to file, excluding
1486
1489
  the terminating null character.
@@ -1488,7 +1491,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
1488
1491
  gzputs returns the number of characters written, or -1 in case of error.
1489
1492
  */
1490
1493
 
1491
- ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
1494
+ ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
1492
1495
  /*
1493
1496
  Read and decompress bytes from file into buf, until len-1 characters are
1494
1497
  read, or until a newline character is read and transferred to buf, or an
@@ -1502,13 +1505,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
1502
1505
  buf are indeterminate.
1503
1506
  */
1504
1507
 
1505
- ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
1508
+ ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
1506
1509
  /*
1507
1510
  Compress and write c, converted to an unsigned char, into file. gzputc
1508
1511
  returns the value that was written, or -1 in case of error.
1509
1512
  */
1510
1513
 
1511
- ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
1514
+ ZEXTERN int ZEXPORT gzgetc(gzFile file);
1512
1515
  /*
1513
1516
  Read and decompress one byte from file. gzgetc returns this byte or -1
1514
1517
  in case of end of file or error. This is implemented as a macro for speed.
@@ -1517,7 +1520,7 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
1517
1520
  points to has been clobbered or not.
1518
1521
  */
1519
1522
 
1520
- ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
1523
+ ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
1521
1524
  /*
1522
1525
  Push c back onto the stream for file to be read as the first character on
1523
1526
  the next read. At least one character of push-back is always allowed.
@@ -1529,7 +1532,7 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
1529
1532
  gzseek() or gzrewind().
1530
1533
  */
1531
1534
 
1532
- ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
1535
+ ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
1533
1536
  /*
1534
1537
  Flush all pending output to file. The parameter flush is as in the
1535
1538
  deflate() function. The return value is the zlib error number (see function
@@ -1545,8 +1548,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
1545
1548
  */
1546
1549
 
1547
1550
  /*
1548
- ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
1549
- z_off_t offset, int whence));
1551
+ ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
1552
+ z_off_t offset, int whence);
1550
1553
 
1551
1554
  Set the starting position to offset relative to whence for the next gzread
1552
1555
  or gzwrite on file. The offset represents a number of bytes in the
@@ -1564,7 +1567,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
1564
1567
  would be before the current position.
1565
1568
  */
1566
1569
 
1567
- ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
1570
+ ZEXTERN int ZEXPORT gzrewind(gzFile file);
1568
1571
  /*
1569
1572
  Rewind file. This function is supported only for reading.
1570
1573
 
@@ -1572,7 +1575,7 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
1572
1575
  */
1573
1576
 
1574
1577
  /*
1575
- ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
1578
+ ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
1576
1579
 
1577
1580
  Return the starting position for the next gzread or gzwrite on file.
1578
1581
  This position represents a number of bytes in the uncompressed data stream,
@@ -1583,7 +1586,7 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
1583
1586
  */
1584
1587
 
1585
1588
  /*
1586
- ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
1589
+ ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
1587
1590
 
1588
1591
  Return the current compressed (actual) read or write offset of file. This
1589
1592
  offset includes the count of bytes that precede the gzip stream, for example
@@ -1592,7 +1595,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
1592
1595
  be used for a progress indicator. On error, gzoffset() returns -1.
1593
1596
  */
1594
1597
 
1595
- ZEXTERN int ZEXPORT gzeof OF((gzFile file));
1598
+ ZEXTERN int ZEXPORT gzeof(gzFile file);
1596
1599
  /*
1597
1600
  Return true (1) if the end-of-file indicator for file has been set while
1598
1601
  reading, false (0) otherwise. Note that the end-of-file indicator is set
@@ -1607,7 +1610,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
1607
1610
  has grown since the previous end of file was detected.
1608
1611
  */
1609
1612
 
1610
- ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
1613
+ ZEXTERN int ZEXPORT gzdirect(gzFile file);
1611
1614
  /*
1612
1615
  Return true (1) if file is being copied directly while reading, or false
1613
1616
  (0) if file is a gzip stream being decompressed.
@@ -1628,7 +1631,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
1628
1631
  gzip file reading and decompression, which may not be desired.)
1629
1632
  */
1630
1633
 
1631
- ZEXTERN int ZEXPORT gzclose OF((gzFile file));
1634
+ ZEXTERN int ZEXPORT gzclose(gzFile file);
1632
1635
  /*
1633
1636
  Flush all pending output for file, if necessary, close file and
1634
1637
  deallocate the (de)compression state. Note that once file is closed, you
@@ -1641,8 +1644,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file));
1641
1644
  last read ended in the middle of a gzip stream, or Z_OK on success.
1642
1645
  */
1643
1646
 
1644
- ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
1645
- ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
1647
+ ZEXTERN int ZEXPORT gzclose_r(gzFile file);
1648
+ ZEXTERN int ZEXPORT gzclose_w(gzFile file);
1646
1649
  /*
1647
1650
  Same as gzclose(), but gzclose_r() is only for use when reading, and
1648
1651
  gzclose_w() is only for use when writing or appending. The advantage to
@@ -1653,7 +1656,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
1653
1656
  zlib library.
1654
1657
  */
1655
1658
 
1656
- ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
1659
+ ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
1657
1660
  /*
1658
1661
  Return the error message for the last error which occurred on file.
1659
1662
  errnum is set to zlib error number. If an error occurred in the file system
@@ -1669,7 +1672,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
1669
1672
  functions above that do not distinguish those cases in their return values.
1670
1673
  */
1671
1674
 
1672
- ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
1675
+ ZEXTERN void ZEXPORT gzclearerr(gzFile file);
1673
1676
  /*
1674
1677
  Clear the error and end-of-file flags for file. This is analogous to the
1675
1678
  clearerr() function in stdio. This is useful for continuing to read a gzip
@@ -1686,7 +1689,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
1686
1689
  library.
1687
1690
  */
1688
1691
 
1689
- ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
1692
+ ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
1690
1693
  /*
1691
1694
  Update a running Adler-32 checksum with the bytes buf[0..len-1] and
1692
1695
  return the updated checksum. An Adler-32 value is in the range of a 32-bit
@@ -1706,15 +1709,15 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
1706
1709
  if (adler != original_adler) error();
1707
1710
  */
1708
1711
 
1709
- ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
1710
- z_size_t len));
1712
+ ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
1713
+ z_size_t len);
1711
1714
  /*
1712
1715
  Same as adler32(), but with a size_t length.
1713
1716
  */
1714
1717
 
1715
1718
  /*
1716
- ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
1717
- z_off_t len2));
1719
+ ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
1720
+ z_off_t len2);
1718
1721
 
1719
1722
  Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
1720
1723
  and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
@@ -1724,7 +1727,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
1724
1727
  negative, the result has no meaning or utility.
1725
1728
  */
1726
1729
 
1727
- ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
1730
+ ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
1728
1731
  /*
1729
1732
  Update a running CRC-32 with the bytes buf[0..len-1] and return the
1730
1733
  updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
@@ -1742,30 +1745,30 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
1742
1745
  if (crc != original_crc) error();
1743
1746
  */
1744
1747
 
1745
- ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf,
1746
- z_size_t len));
1748
+ ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
1749
+ z_size_t len);
1747
1750
  /*
1748
1751
  Same as crc32(), but with a size_t length.
1749
1752
  */
1750
1753
 
1751
1754
  /*
1752
- ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
1755
+ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
1753
1756
 
1754
1757
  Combine two CRC-32 check values into one. For two sequences of bytes,
1755
1758
  seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
1756
1759
  calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
1757
1760
  check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
1758
- len2.
1761
+ len2. len2 must be non-negative.
1759
1762
  */
1760
1763
 
1761
1764
  /*
1762
- ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2));
1765
+ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
1763
1766
 
1764
1767
  Return the operator corresponding to length len2, to be used with
1765
- crc32_combine_op().
1768
+ crc32_combine_op(). len2 must be non-negative.
1766
1769
  */
1767
1770
 
1768
- ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
1771
+ ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
1769
1772
  /*
1770
1773
  Give the same result as crc32_combine(), using op in place of len2. op is
1771
1774
  is generated from len2 by crc32_combine_gen(). This will be faster than
@@ -1778,20 +1781,20 @@ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op));
1778
1781
  /* deflateInit and inflateInit are macros to allow checking the zlib version
1779
1782
  * and the compiler's view of z_stream:
1780
1783
  */
1781
- ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
1782
- const char *version, int stream_size));
1783
- ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
1784
- const char *version, int stream_size));
1785
- ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
1786
- int windowBits, int memLevel,
1787
- int strategy, const char *version,
1788
- int stream_size));
1789
- ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
1790
- const char *version, int stream_size));
1791
- ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1792
- unsigned char FAR *window,
1793
- const char *version,
1794
- int stream_size));
1784
+ ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level,
1785
+ const char *version, int stream_size);
1786
+ ZEXTERN int ZEXPORT inflateInit_(z_streamp strm,
1787
+ const char *version, int stream_size);
1788
+ ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
1789
+ int windowBits, int memLevel,
1790
+ int strategy, const char *version,
1791
+ int stream_size);
1792
+ ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
1793
+ const char *version, int stream_size);
1794
+ ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
1795
+ unsigned char FAR *window,
1796
+ const char *version,
1797
+ int stream_size);
1795
1798
  #ifdef Z_PREFIX_SET
1796
1799
  # define z_deflateInit(strm, level) \
1797
1800
  deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
@@ -1836,7 +1839,7 @@ struct gzFile_s {
1836
1839
  unsigned char *next;
1837
1840
  z_off64_t pos;
1838
1841
  };
1839
- ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
1842
+ ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
1840
1843
  #ifdef Z_PREFIX_SET
1841
1844
  # undef z_gzgetc
1842
1845
  # define z_gzgetc(g) \
@@ -1853,13 +1856,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
1853
1856
  * without large file support, _LFS64_LARGEFILE must also be true
1854
1857
  */
1855
1858
  #ifdef Z_LARGE64
1856
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
1857
- ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
1858
- ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
1859
- ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
1860
- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
1861
- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
1862
- ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t));
1859
+ ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
1860
+ ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
1861
+ ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
1862
+ ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
1863
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
1864
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
1865
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
1863
1866
  #endif
1864
1867
 
1865
1868
  #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
@@ -1881,50 +1884,50 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
1881
1884
  # define crc32_combine_gen crc32_combine_gen64
1882
1885
  # endif
1883
1886
  # ifndef Z_LARGE64
1884
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
1885
- ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
1886
- ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
1887
- ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
1888
- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
1889
- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
1890
- ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t));
1887
+ ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
1888
+ ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
1889
+ ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
1890
+ ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
1891
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
1892
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
1893
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
1891
1894
  # endif
1892
1895
  #else
1893
- ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
1894
- ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
1895
- ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
1896
- ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
1897
- ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
1898
- ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
1899
- ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
1896
+ ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
1897
+ ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
1898
+ ZEXTERN z_off_t ZEXPORT gztell(gzFile);
1899
+ ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
1900
+ ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
1901
+ ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
1902
+ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
1900
1903
  #endif
1901
1904
 
1902
1905
  #else /* Z_SOLO */
1903
1906
 
1904
- ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
1905
- ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
1906
- ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t));
1907
+ ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
1908
+ ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
1909
+ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
1907
1910
 
1908
1911
  #endif /* !Z_SOLO */
1909
1912
 
1910
1913
  /* undocumented functions */
1911
- ZEXTERN const char * ZEXPORT zError OF((int));
1912
- ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
1913
- ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
1914
- ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
1915
- ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
1916
- ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
1917
- ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
1918
- ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
1914
+ ZEXTERN const char * ZEXPORT zError(int);
1915
+ ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp);
1916
+ ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
1917
+ ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int);
1918
+ ZEXTERN int ZEXPORT inflateValidate(z_streamp, int);
1919
+ ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp);
1920
+ ZEXTERN int ZEXPORT inflateResetKeep(z_streamp);
1921
+ ZEXTERN int ZEXPORT deflateResetKeep(z_streamp);
1919
1922
  #if defined(_WIN32) && !defined(Z_SOLO)
1920
- ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
1921
- const char *mode));
1923
+ ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path,
1924
+ const char *mode);
1922
1925
  #endif
1923
1926
  #if defined(STDC) || defined(Z_HAVE_STDARG_H)
1924
1927
  # ifndef Z_SOLO
1925
- ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
1926
- const char *format,
1927
- va_list va));
1928
+ ZEXTERN int ZEXPORTVA gzvprintf(gzFile file,
1929
+ const char *format,
1930
+ va_list va);
1928
1931
  # endif
1929
1932
  #endif
1930
1933