cairo 1.15.6-x64-mingw32 → 1.15.7-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +16 -1
  3. data/Rakefile +3 -2
  4. data/ext/cairo/rb_cairo.h +1 -1
  5. data/lib/2.2/cairo.so +0 -0
  6. data/lib/2.3/cairo.so +0 -0
  7. data/lib/2.4/cairo.so +0 -0
  8. data/vendor/local/bin/fc-cache.exe +0 -0
  9. data/vendor/local/bin/fc-cat.exe +0 -0
  10. data/vendor/local/bin/fc-list.exe +0 -0
  11. data/vendor/local/bin/fc-match.exe +0 -0
  12. data/vendor/local/bin/fc-pattern.exe +0 -0
  13. data/vendor/local/bin/fc-query.exe +0 -0
  14. data/vendor/local/bin/fc-scan.exe +0 -0
  15. data/vendor/local/bin/fc-validate.exe +0 -0
  16. data/vendor/local/bin/libcairo-2.dll +0 -0
  17. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  18. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  19. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  20. data/vendor/local/bin/libfreetype-6.dll +0 -0
  21. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  22. data/vendor/local/bin/libpng16-16.dll +0 -0
  23. data/vendor/local/bin/libxml2-2.dll +0 -0
  24. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  25. data/vendor/local/bin/pngfix.exe +0 -0
  26. data/vendor/local/bin/xmlcatalog.exe +0 -0
  27. data/vendor/local/bin/xmllint.exe +0 -0
  28. data/vendor/local/bin/zlib1.dll +0 -0
  29. data/vendor/local/include/libpng16/pnglibconf.h +1 -1
  30. data/vendor/local/include/pnglibconf.h +1 -1
  31. data/vendor/local/include/zconf.h +9 -32
  32. data/vendor/local/include/zlib.h +154 -298
  33. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  34. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  35. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  36. data/vendor/local/lib/libcairo.a +0 -0
  37. data/vendor/local/lib/libcairo.dll.a +0 -0
  38. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  39. data/vendor/local/lib/libfreetype.a +0 -0
  40. data/vendor/local/lib/libfreetype.dll.a +0 -0
  41. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  42. data/vendor/local/lib/libpng.a +0 -0
  43. data/vendor/local/lib/libpng.dll.a +0 -0
  44. data/vendor/local/lib/libpng16.a +0 -0
  45. data/vendor/local/lib/libpng16.dll.a +0 -0
  46. data/vendor/local/lib/libxml2.a +0 -0
  47. data/vendor/local/lib/libxml2.dll.a +0 -0
  48. data/vendor/local/lib/libz.a +0 -0
  49. data/vendor/local/lib/libz.dll.a +0 -0
  50. data/vendor/local/lib/pkgconfig/zlib.pc +1 -1
  51. data/vendor/local/share/license/zlib/README +3 -3
  52. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 915e61bc437ce59886917cd620cffb1fb1077649
4
- data.tar.gz: 538ace9fce8bfda968d4a3aa93abdb4d468541a1
3
+ metadata.gz: 3c114e585154bd814104808a1945f2773a09557a
4
+ data.tar.gz: a0934443b7f996f2be5ee624b9c0705f0ee296bf
5
5
  SHA512:
6
- metadata.gz: 8653ae1fe3dd55244cf3819c4501358a660ba76e4e18a3c1309dc672eca23a6e7e5ef37b5d269ecc0e555ab4be2656382ee0f85435512c5acc332d3eb9654b2e
7
- data.tar.gz: 2c80f9a3cfdb56b1ab2320462940cf24ddb6ae2827ad8d6edeb2d0c76d27ec2c8b2a9fda9dd0298270accf7677b45b608acaf6bd3ea42f43cd67a48e7033cbe4
6
+ metadata.gz: e205175fa3fcabc57bfe81105af3dc2caca106bd6d5815712f599a9eb285366a81a15210e784cf5f6d0f2412d322035ddee558e131e21b2d340cb7c142cf593b
7
+ data.tar.gz: d0dd20ccaf896a257780f785ae5072ce81552ec3a9ac6eeff27d48738ea28b8c559f1cb857fc01af4985746b74f29691302b774d21a00d3a5ee6c751554bd03a
data/NEWS CHANGED
@@ -1,3 +1,18 @@
1
+ Release 1.15.7 (2017-05-01) Kouhei Sutou <kou@cozmixng.org>
2
+ ===========================================================
3
+
4
+ Fixes
5
+ -----
6
+
7
+ * Windows: Fixed zlib version. We should use the same version
8
+ as Ruby Installer. Ruby Installer uses zlib 1.2.8.
9
+ [GitHub#47][Reported by jjgh]
10
+
11
+ Thanks
12
+ ------
13
+
14
+ * jigh
15
+
1
16
  Release 1.15.6 (2017-04-27) Kouhei Sutou <kou@cozmixng.org>
2
17
  ===========================================================
3
18
 
@@ -5,7 +20,7 @@ Improvements
5
20
  ------------
6
21
 
7
22
  * Added Cairo::Context#refrence_count.
8
- * Windows: Update bundled libraries:
23
+ * Windows: Updated bundled libraries:
9
24
  * zlib: 1.2.10 -> 1.2.11
10
25
  * libpng: 1.6.27 -> 1.6.29
11
26
  * FreeType: 2.7 -> 2.7.1
data/Rakefile CHANGED
@@ -441,9 +441,10 @@ end
441
441
  windows_task = WindowsTask.new(spec) do |task|
442
442
  task.packages = [
443
443
  {
444
+ # We should use the same version as Ruby Installer.
444
445
  :name => "zlib",
445
- :version => "1.2.11",
446
- :download_base_url => "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11",
446
+ :version => "1.2.8",
447
+ :download_base_url => "https://downloads.sourceforge.net/project/libpng/zlib/1.2.8",
447
448
  :compression_method => "gz",
448
449
  :windows => {
449
450
  :builder => ZlibBuilder.new,
data/ext/cairo/rb_cairo.h CHANGED
@@ -73,7 +73,7 @@ RB_CAIRO_BEGIN_DECLS
73
73
 
74
74
  #define RB_CAIRO_VERSION_MAJOR 1
75
75
  #define RB_CAIRO_VERSION_MINOR 15
76
- #define RB_CAIRO_VERSION_MICRO 6
76
+ #define RB_CAIRO_VERSION_MICRO 7
77
77
 
78
78
  RB_CAIRO_VAR VALUE rb_mCairo;
79
79
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
data/lib/2.2/cairo.so CHANGED
Binary file
data/lib/2.3/cairo.so CHANGED
Binary file
data/lib/2.4/cairo.so CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -205,7 +205,7 @@
205
205
  #define PNG_USER_HEIGHT_MAX 1000000
206
206
  #define PNG_USER_WIDTH_MAX 1000000
207
207
  #define PNG_ZBUF_SIZE 8192
208
- #define PNG_ZLIB_VERNUM 0x12b0
208
+ #define PNG_ZLIB_VERNUM 0x1280
209
209
  #define PNG_Z_DEFAULT_COMPRESSION (-1)
210
210
  #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
211
211
  #define PNG_Z_DEFAULT_STRATEGY 1
@@ -205,7 +205,7 @@
205
205
  #define PNG_USER_HEIGHT_MAX 1000000
206
206
  #define PNG_USER_WIDTH_MAX 1000000
207
207
  #define PNG_ZBUF_SIZE 8192
208
- #define PNG_ZLIB_VERNUM 0x12b0
208
+ #define PNG_ZLIB_VERNUM 0x1280
209
209
  #define PNG_Z_DEFAULT_COMPRESSION (-1)
210
210
  #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
211
211
  #define PNG_Z_DEFAULT_STRATEGY 1
@@ -1,5 +1,5 @@
1
1
  /* zconf.h -- configuration of the zlib compression library
2
- * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
2
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
3
3
  * For conditions of distribution and use, see copyright notice in zlib.h
4
4
  */
5
5
 
@@ -17,7 +17,7 @@
17
17
  #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
18
18
  # define Z_PREFIX_SET
19
19
 
20
- /* all linked symbols and init macros */
20
+ /* all linked symbols */
21
21
  # define _dist_code z__dist_code
22
22
  # define _length_code z__length_code
23
23
  # define _tr_align z__tr_align
@@ -29,7 +29,6 @@
29
29
  # define adler32 z_adler32
30
30
  # define adler32_combine z_adler32_combine
31
31
  # define adler32_combine64 z_adler32_combine64
32
- # define adler32_z z_adler32_z
33
32
  # ifndef Z_SOLO
34
33
  # define compress z_compress
35
34
  # define compress2 z_compress2
@@ -38,14 +37,10 @@
38
37
  # define crc32 z_crc32
39
38
  # define crc32_combine z_crc32_combine
40
39
  # define crc32_combine64 z_crc32_combine64
41
- # define crc32_z z_crc32_z
42
40
  # define deflate z_deflate
43
41
  # define deflateBound z_deflateBound
44
42
  # define deflateCopy z_deflateCopy
45
43
  # define deflateEnd z_deflateEnd
46
- # define deflateGetDictionary z_deflateGetDictionary
47
- # define deflateInit z_deflateInit
48
- # define deflateInit2 z_deflateInit2
49
44
  # define deflateInit2_ z_deflateInit2_
50
45
  # define deflateInit_ z_deflateInit_
51
46
  # define deflateParams z_deflateParams
@@ -72,8 +67,6 @@
72
67
  # define gzeof z_gzeof
73
68
  # define gzerror z_gzerror
74
69
  # define gzflush z_gzflush
75
- # define gzfread z_gzfread
76
- # define gzfwrite z_gzfwrite
77
70
  # define gzgetc z_gzgetc
78
71
  # define gzgetc_ z_gzgetc_
79
72
  # define gzgets z_gzgets
@@ -85,6 +78,7 @@
85
78
  # define gzopen_w z_gzopen_w
86
79
  # endif
87
80
  # define gzprintf z_gzprintf
81
+ # define gzvprintf z_gzvprintf
88
82
  # define gzputc z_gzputc
89
83
  # define gzputs z_gzputs
90
84
  # define gzread z_gzread
@@ -95,39 +89,32 @@
95
89
  # define gztell z_gztell
96
90
  # define gztell64 z_gztell64
97
91
  # define gzungetc z_gzungetc
98
- # define gzvprintf z_gzvprintf
99
92
  # define gzwrite z_gzwrite
100
93
  # endif
101
94
  # define inflate z_inflate
102
95
  # define inflateBack z_inflateBack
103
96
  # define inflateBackEnd z_inflateBackEnd
104
- # define inflateBackInit z_inflateBackInit
105
97
  # define inflateBackInit_ z_inflateBackInit_
106
- # define inflateCodesUsed z_inflateCodesUsed
107
98
  # define inflateCopy z_inflateCopy
108
99
  # define inflateEnd z_inflateEnd
109
- # define inflateGetDictionary z_inflateGetDictionary
110
100
  # define inflateGetHeader z_inflateGetHeader
111
- # define inflateInit z_inflateInit
112
- # define inflateInit2 z_inflateInit2
113
101
  # define inflateInit2_ z_inflateInit2_
114
102
  # define inflateInit_ z_inflateInit_
115
103
  # define inflateMark z_inflateMark
116
104
  # define inflatePrime z_inflatePrime
117
105
  # define inflateReset z_inflateReset
118
106
  # define inflateReset2 z_inflateReset2
119
- # define inflateResetKeep z_inflateResetKeep
120
107
  # define inflateSetDictionary z_inflateSetDictionary
108
+ # define inflateGetDictionary z_inflateGetDictionary
121
109
  # define inflateSync z_inflateSync
122
110
  # define inflateSyncPoint z_inflateSyncPoint
123
111
  # define inflateUndermine z_inflateUndermine
124
- # define inflateValidate z_inflateValidate
112
+ # define inflateResetKeep z_inflateResetKeep
125
113
  # define inflate_copyright z_inflate_copyright
126
114
  # define inflate_fast z_inflate_fast
127
115
  # define inflate_table z_inflate_table
128
116
  # ifndef Z_SOLO
129
117
  # define uncompress z_uncompress
130
- # define uncompress2 z_uncompress2
131
118
  # endif
132
119
  # define zError z_zError
133
120
  # ifndef Z_SOLO
@@ -237,19 +224,9 @@
237
224
  # define z_const
238
225
  #endif
239
226
 
240
- #ifdef Z_SOLO
241
- typedef unsigned long z_size_t;
242
- #else
243
- # define z_longlong long long
244
- # if defined(NO_SIZE_T)
245
- typedef unsigned NO_SIZE_T z_size_t;
246
- # elif defined(STDC)
247
- # include <stddef.h>
248
- typedef size_t z_size_t;
249
- # else
250
- typedef unsigned long z_size_t;
251
- # endif
252
- # undef z_longlong
227
+ /* Some Mac compilers merge all .h files incorrectly: */
228
+ #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
229
+ # define NO_DUMMY_DECL
253
230
  #endif
254
231
 
255
232
  /* Maximum value for memLevel in deflateInit2 */
@@ -279,7 +256,7 @@
279
256
  Of course this will generally degrade compression (there's no free lunch).
280
257
 
281
258
  The memory requirements for inflate are (in bytes) 1 << windowBits
282
- that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
259
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
283
260
  for small objects.
284
261
  */
285
262
 
@@ -1,7 +1,7 @@
1
1
  /* zlib.h -- interface of the 'zlib' general purpose compression library
2
- version 1.2.11, January 15th, 2017
2
+ version 1.2.8, April 28th, 2013
3
3
 
4
- Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
4
+ Copyright (C) 1995-2013 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.11"
41
- #define ZLIB_VERNUM 0x12b0
40
+ #define ZLIB_VERSION "1.2.8"
41
+ #define ZLIB_VERNUM 0x1280
42
42
  #define ZLIB_VER_MAJOR 1
43
43
  #define ZLIB_VER_MINOR 2
44
- #define ZLIB_VER_REVISION 11
44
+ #define ZLIB_VER_REVISION 8
45
45
  #define ZLIB_VER_SUBREVISION 0
46
46
 
47
47
  /*
@@ -65,8 +65,7 @@ extern "C" {
65
65
  with "gz". The gzip format is different from the zlib format. gzip is a
66
66
  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
67
67
 
68
- This library can optionally read and write gzip and raw deflate streams in
69
- memory as well.
68
+ This library can optionally read and write gzip streams in memory as well.
70
69
 
71
70
  The zlib format was designed to be compact and fast for use in memory
72
71
  and on communications channels. The gzip format was designed for single-
@@ -75,7 +74,7 @@ extern "C" {
75
74
 
76
75
  The library does not install any signal handler. The decoder checks
77
76
  the consistency of the compressed data, so the library should never crash
78
- even in the case of corrupted input.
77
+ even in case of corrupted input.
79
78
  */
80
79
 
81
80
  typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
@@ -88,7 +87,7 @@ typedef struct z_stream_s {
88
87
  uInt avail_in; /* number of bytes available at next_in */
89
88
  uLong total_in; /* total number of input bytes read so far */
90
89
 
91
- Bytef *next_out; /* next output byte will go here */
90
+ Bytef *next_out; /* next output byte should be put there */
92
91
  uInt avail_out; /* remaining free space at next_out */
93
92
  uLong total_out; /* total number of bytes output so far */
94
93
 
@@ -99,9 +98,8 @@ typedef struct z_stream_s {
99
98
  free_func zfree; /* used to free the internal state */
100
99
  voidpf opaque; /* private data object passed to zalloc and zfree */
101
100
 
102
- int data_type; /* best guess about the data type: binary or text
103
- for deflate, or the decoding state for inflate */
104
- uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
101
+ int data_type; /* best guess about the data type: binary or text */
102
+ uLong adler; /* adler32 value of the uncompressed data */
105
103
  uLong reserved; /* reserved for future use */
106
104
  } z_stream;
107
105
 
@@ -144,9 +142,7 @@ typedef gz_header FAR *gz_headerp;
144
142
 
145
143
  zalloc must return Z_NULL if there is not enough memory for the object.
146
144
  If zlib is used in a multi-threaded application, zalloc and zfree must be
147
- thread safe. In that case, zlib is thread-safe. When zalloc and zfree are
148
- Z_NULL on entry to the initialization function, they are set to internal
149
- routines that use the standard library functions malloc() and free().
145
+ thread safe.
150
146
 
151
147
  On 16-bit systems, the functions zalloc and zfree must be able to allocate
152
148
  exactly 65536 bytes, but will not be required to allocate more than this if
@@ -159,7 +155,7 @@ typedef gz_header FAR *gz_headerp;
159
155
 
160
156
  The fields total_in and total_out can be used for statistics or progress
161
157
  reports. After compression, total_in holds the total size of the
162
- uncompressed data and may be saved for use by the decompressor (particularly
158
+ uncompressed data and may be saved for use in the decompressor (particularly
163
159
  if the decompressor wants to decompress everything in a single step).
164
160
  */
165
161
 
@@ -204,7 +200,7 @@ typedef gz_header FAR *gz_headerp;
204
200
  #define Z_TEXT 1
205
201
  #define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
206
202
  #define Z_UNKNOWN 2
207
- /* Possible values of the data_type field for deflate() */
203
+ /* Possible values of the data_type field (though see inflate()) */
208
204
 
209
205
  #define Z_DEFLATED 8
210
206
  /* The deflate compression method (the only one supported in this version) */
@@ -262,11 +258,11 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
262
258
  enough room in the output buffer), next_in and avail_in are updated and
263
259
  processing will resume at this point for the next call of deflate().
264
260
 
265
- - Generate more output starting at next_out and update next_out and avail_out
261
+ - Provide more output starting at next_out and update next_out and avail_out
266
262
  accordingly. This action is forced if the parameter flush is non zero.
267
263
  Forcing flush frequently degrades the compression ratio, so this parameter
268
- should be set only when necessary. Some output may be provided even if
269
- flush is zero.
264
+ should be set only when necessary (in interactive applications). Some
265
+ output may be provided even if flush is not set.
270
266
 
271
267
  Before the call of deflate(), the application should ensure that at least
272
268
  one of the actions is possible, by providing more input and/or consuming more
@@ -275,9 +271,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
275
271
  output when it wants, for example when the output buffer is full (avail_out
276
272
  == 0), or after each call of deflate(). If deflate returns Z_OK and with
277
273
  zero avail_out, it must be called again after making room in the output
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
280
- in that case.
274
+ buffer because there might be more output pending.
281
275
 
282
276
  Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
283
277
  decide how much data to accumulate before producing output, in order to
@@ -298,8 +292,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
298
292
  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
299
293
  This completes the current deflate block and follows it with an empty fixed
300
294
  codes block that is 10 bits long. This assures that enough bytes are output
301
- in order for the decompressor to finish the block before the empty fixed
302
- codes block.
295
+ in order for the decompressor to finish the block before the empty fixed code
296
+ block.
303
297
 
304
298
  If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
305
299
  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
@@ -325,38 +319,34 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
325
319
 
326
320
  If the parameter flush is set to Z_FINISH, pending input is processed,
327
321
  pending output is flushed and deflate returns with Z_STREAM_END if there was
328
- enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
329
- function must be called again with Z_FINISH and more output space (updated
330
- avail_out) but no more input data, until it returns with Z_STREAM_END or an
331
- error. After deflate has returned Z_STREAM_END, the only possible operations
332
- on the stream are deflateReset or deflateEnd.
333
-
334
- Z_FINISH can be used in the first deflate call after deflateInit if all the
335
- compression is to be done in a single step. In order to complete in one
336
- call, avail_out must be at least the value returned by deflateBound (see
337
- below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
338
- output space is provided, deflate will not return Z_STREAM_END, and it must
339
- be called again as described above.
340
-
341
- deflate() sets strm->adler to the Adler-32 checksum of all input read
342
- so far (that is, total_in bytes). If a gzip stream is being generated, then
343
- strm->adler will be the CRC-32 checksum of the input read so far. (See
344
- deflateInit2 below.)
322
+ enough output space; if deflate returns with Z_OK, this function must be
323
+ called again with Z_FINISH and more output space (updated avail_out) but no
324
+ more input data, until it returns with Z_STREAM_END or an error. After
325
+ deflate has returned Z_STREAM_END, the only possible operations on the stream
326
+ are deflateReset or deflateEnd.
327
+
328
+ Z_FINISH can be used immediately after deflateInit if all the compression
329
+ is to be done in a single step. In this case, avail_out must be at least the
330
+ value returned by deflateBound (see below). Then deflate is guaranteed to
331
+ return Z_STREAM_END. If not enough output space is provided, deflate will
332
+ not return Z_STREAM_END, and it must be called again as described above.
333
+
334
+ deflate() sets strm->adler to the adler32 checksum of all input read
335
+ so far (that is, total_in bytes).
345
336
 
346
337
  deflate() may update strm->data_type if it can make a good guess about
347
- the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
348
- considered binary. This field is only for information purposes and does not
349
- affect the compression algorithm in any manner.
338
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
339
+ binary. This field is only for information purposes and does not affect the
340
+ compression algorithm in any manner.
350
341
 
351
342
  deflate() returns Z_OK if some progress has been made (more input
352
343
  processed or more output produced), Z_STREAM_END if all input has been
353
344
  consumed and all output has been produced (only when flush is set to
354
345
  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
355
- if next_in or next_out was Z_NULL or the state was inadvertently written over
356
- by the application), or Z_BUF_ERROR if no progress is possible (for example
357
- avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
358
- deflate() can be called again with more input and more output space to
359
- continue compressing.
346
+ if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
347
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
348
+ fatal, and deflate() can be called again with more input and more output
349
+ space to continue compressing.
360
350
  */
361
351
 
362
352
 
@@ -379,21 +369,23 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
379
369
 
380
370
  Initializes the internal stream state for decompression. The fields
381
371
  next_in, avail_in, zalloc, zfree and opaque must be initialized before by
382
- the caller. In the current version of inflate, the provided input is not
383
- read or consumed. The allocation of a sliding window will be deferred to
384
- the first call of inflate (if the decompression does not complete on the
385
- first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
386
- them to use default allocation functions.
372
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the
373
+ exact value depends on the compression method), inflateInit determines the
374
+ compression method from the zlib header and allocates all data structures
375
+ accordingly; otherwise the allocation will be deferred to the first call of
376
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
377
+ use default allocation functions.
387
378
 
388
379
  inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
389
380
  memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
390
381
  version assumed by the caller, or Z_STREAM_ERROR if the parameters are
391
382
  invalid, such as a null pointer to the structure. msg is set to null if
392
- there is no error message. inflateInit does not perform any decompression.
393
- Actual decompression will be done by inflate(). So next_in, and avail_in,
394
- next_out, and avail_out are unused and unchanged. The current
395
- implementation of inflateInit() does not process any header information --
396
- that is deferred until inflate() is called.
383
+ there is no error message. inflateInit does not perform any decompression
384
+ apart from possibly reading the zlib header if present: actual decompression
385
+ will be done by inflate(). (So next_in and avail_in may be modified, but
386
+ next_out and avail_out are unused and unchanged.) The current implementation
387
+ of inflateInit() does not process any header information -- that is deferred
388
+ until inflate() is called.
397
389
  */
398
390
 
399
391
 
@@ -409,20 +401,17 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
409
401
 
410
402
  - Decompress more input starting at next_in and update next_in and avail_in
411
403
  accordingly. If not all input can be processed (because there is not
412
- enough room in the output buffer), then next_in and avail_in are updated
413
- accordingly, and processing will resume at this point for the next call of
414
- inflate().
404
+ enough room in the output buffer), next_in is updated and processing will
405
+ resume at this point for the next call of inflate().
415
406
 
416
- - Generate more output starting at next_out and update next_out and avail_out
407
+ - Provide more output starting at next_out and update next_out and avail_out
417
408
  accordingly. inflate() provides as much output as possible, until there is
418
409
  no more input data or no more space in the output buffer (see below about
419
410
  the flush parameter).
420
411
 
421
412
  Before the call of inflate(), the application should ensure that at least
422
413
  one of the actions is possible, by providing more input and/or consuming more
423
- output, and updating the next_* and avail_* values accordingly. If the
424
- caller of inflate() does not provide both available input and available
425
- output space, it is possible that there will be no progress made. The
414
+ output, and updating the next_* and avail_* values accordingly. The
426
415
  application can consume the uncompressed output when it wants, for example
427
416
  when the output buffer is full (avail_out == 0), or after each call of
428
417
  inflate(). If inflate returns Z_OK and with zero avail_out, it must be
@@ -439,7 +428,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
439
428
  gets to the end of that block, or when it runs out of data.
440
429
 
441
430
  The Z_BLOCK option assists in appending to or combining deflate streams.
442
- To assist in this, on return inflate() always sets strm->data_type to the
431
+ Also to assist in this, on return inflate() will set strm->data_type to the
443
432
  number of unused bits in the last byte taken from strm->next_in, plus 64 if
444
433
  inflate() is currently decoding the last block in the deflate stream, plus
445
434
  128 if inflate() returned immediately after decoding an end-of-block code or
@@ -465,7 +454,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
465
454
  this case all pending input is processed and all pending output is flushed;
466
455
  avail_out must be large enough to hold all of the uncompressed data for the
467
456
  operation to complete. (The size of the uncompressed data may have been
468
- saved by the compressor for this purpose.) The use of Z_FINISH is not
457
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
469
458
  required to perform an inflation in one step. However it may be used to
470
459
  inform inflate that a faster approach can be used for the single inflate()
471
460
  call. Z_FINISH also informs inflate to not maintain a sliding window if the
@@ -487,33 +476,32 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
487
476
  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
488
477
  strm->adler to the Adler-32 checksum of all output produced so far (that is,
489
478
  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
490
- below. At the end of the stream, inflate() checks that its computed Adler-32
479
+ below. At the end of the stream, inflate() checks that its computed adler32
491
480
  checksum is equal to that saved by the compressor and returns Z_STREAM_END
492
481
  only if the checksum is correct.
493
482
 
494
483
  inflate() can decompress and check either zlib-wrapped or gzip-wrapped
495
484
  deflate data. The header type is detected automatically, if requested when
496
485
  initializing with inflateInit2(). Any information contained in the gzip
497
- header is not retained unless inflateGetHeader() is used. When processing
486
+ header is not retained, so applications that need that information should
487
+ instead use raw inflate, see inflateInit2() below, or inflateBack() and
488
+ perform their own processing of the gzip header and trailer. When processing
498
489
  gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
499
- produced so far. The CRC-32 is checked against the gzip trailer, as is the
500
- uncompressed length, modulo 2^32.
490
+ producted so far. The CRC-32 is checked against the gzip trailer.
501
491
 
502
492
  inflate() returns Z_OK if some progress has been made (more input processed
503
493
  or more output produced), Z_STREAM_END if the end of the compressed data has
504
494
  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
505
495
  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
506
496
  corrupted (input stream not conforming to the zlib format or incorrect check
507
- value, in which case strm->msg points to a string with a more specific
508
- error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
509
- next_in or next_out was Z_NULL, or the state was inadvertently written over
510
- by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
511
- if no progress was possible or if there was not enough room in the output
512
- buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
497
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
498
+ next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
499
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
500
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
513
501
  inflate() can be called again with more input and more output space to
514
502
  continue decompressing. If Z_DATA_ERROR is returned, the application may
515
503
  then call inflateSync() to look for a good compression block if a partial
516
- recovery of the data is to be attempted.
504
+ recovery of the data is desired.
517
505
  */
518
506
 
519
507
 
@@ -523,8 +511,9 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
523
511
  This function discards any unprocessed input and does not flush any pending
524
512
  output.
525
513
 
526
- inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
527
- was inconsistent.
514
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
515
+ was inconsistent. In the error case, msg may be set but then points to a
516
+ static string (which must not be deallocated).
528
517
  */
529
518
 
530
519
 
@@ -555,29 +544,16 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
555
544
  compression at the expense of memory usage. The default value is 15 if
556
545
  deflateInit is used instead.
557
546
 
558
- For the current implementation of deflate(), a windowBits value of 8 (a
559
- window size of 256 bytes) is not supported. As a result, a request for 8
560
- will result in 9 (a 512-byte window). In that case, providing 8 to
561
- inflateInit2() will result in an error when the zlib header with 9 is
562
- checked against the initialization of inflate(). The remedy is to not use 8
563
- with deflateInit2() with this initialization, or at least in that case use 9
564
- with inflateInit2().
565
-
566
547
  windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
567
548
  determines the window size. deflate() will then generate raw deflate data
568
- with no zlib header or trailer, and will not compute a check value.
549
+ with no zlib header or trailer, and will not compute an adler32 check value.
569
550
 
570
551
  windowBits can also be greater than 15 for optional gzip encoding. Add
571
552
  16 to windowBits to write a simple gzip header and trailer around the
572
553
  compressed data instead of a zlib wrapper. The gzip header will have no
573
554
  file name, no extra data, no comment, no modification time (set to zero), no
574
- header crc, and the operating system will be set to the appropriate value,
575
- if the operating system was determined at compile time. If a gzip stream is
576
- being written, strm->adler is a CRC-32 instead of an Adler-32.
577
-
578
- For raw deflate or gzip encoding, a request for a 256-byte window is
579
- rejected as invalid, since only the zlib header provides a means of
580
- transmitting the window size to the decompressor.
555
+ header crc, and the operating system will be set to 255 (unknown). If a
556
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
581
557
 
582
558
  The memLevel parameter specifies how much memory should be allocated
583
559
  for the internal compression state. memLevel=1 uses minimum memory but is
@@ -638,12 +614,12 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
638
614
  addition, the current implementation of deflate will use at most the window
639
615
  size minus 262 bytes of the provided dictionary.
640
616
 
641
- Upon return of this function, strm->adler is set to the Adler-32 value
617
+ Upon return of this function, strm->adler is set to the adler32 value
642
618
  of the dictionary; the decompressor may later use this value to determine
643
- which dictionary has been used by the compressor. (The Adler-32 value
619
+ which dictionary has been used by the compressor. (The adler32 value
644
620
  applies to the whole dictionary even if only a subset of the dictionary is
645
621
  actually used by the compressor.) If a raw deflate was requested, then the
646
- Adler-32 value is not computed and strm->adler is not set.
622
+ adler32 value is not computed and strm->adler is not set.
647
623
 
648
624
  deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
649
625
  parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
@@ -652,28 +628,6 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
652
628
  not perform any compression: this will be done by deflate().
653
629
  */
654
630
 
655
- ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm,
656
- Bytef *dictionary,
657
- uInt *dictLength));
658
- /*
659
- Returns the sliding dictionary being maintained by deflate. dictLength is
660
- set to the number of bytes in the dictionary, and that many bytes are copied
661
- to dictionary. dictionary must have enough space, where 32768 bytes is
662
- always enough. If deflateGetDictionary() is called with dictionary equal to
663
- Z_NULL, then only the dictionary length is returned, and nothing is copied.
664
- Similary, if dictLength is Z_NULL, then it is not set.
665
-
666
- deflateGetDictionary() may return a length less than the window size, even
667
- when more than the window size in input has been provided. It may return up
668
- to 258 bytes less in that case, due to how zlib's implementation of deflate
669
- manages the sliding window and lookahead for matches, where matches can be
670
- up to 258 bytes long. If the application needs the last window-size bytes of
671
- input, then that would need to be saved by the application outside of zlib.
672
-
673
- deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
674
- stream state is inconsistent.
675
- */
676
-
677
631
  ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
678
632
  z_streamp source));
679
633
  /*
@@ -694,10 +648,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
694
648
 
695
649
  ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
696
650
  /*
697
- This function is equivalent to deflateEnd followed by deflateInit, but
698
- does not free and reallocate the internal compression state. The stream
699
- will leave the compression level and any other attributes that may have been
700
- set unchanged.
651
+ This function is equivalent to deflateEnd followed by deflateInit,
652
+ but does not free and reallocate all the internal compression state. The
653
+ stream will keep the same compression level and any other attributes that
654
+ may have been set by deflateInit2.
701
655
 
702
656
  deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
703
657
  stream state was inconsistent (such as zalloc or state being Z_NULL).
@@ -708,36 +662,20 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
708
662
  int strategy));
709
663
  /*
710
664
  Dynamically update the compression level and compression strategy. The
711
- interpretation of level and strategy is as in deflateInit2(). This can be
665
+ interpretation of level and strategy is as in deflateInit2. This can be
712
666
  used to switch between compression and straight copy of the input data, or
713
667
  to switch to a different kind of input data requiring a different strategy.
714
- If the compression approach (which is a function of the level) or the
715
- strategy is changed, and if any input has been consumed in a previous
716
- deflate() call, then the input available so far is compressed with the old
717
- level and strategy using deflate(strm, Z_BLOCK). There are three approaches
718
- for the compression levels 0, 1..3, and 4..9 respectively. The new level
719
- and strategy will take effect at the next call of deflate().
720
-
721
- If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
722
- not have enough output space to complete, then the parameter change will not
723
- take effect. In this case, deflateParams() can be called again with the
724
- same parameters and more output space to try again.
725
-
726
- In order to assure a change in the parameters on the first try, the
727
- deflate stream should be flushed using deflate() with Z_BLOCK or other flush
728
- request until strm.avail_out is not zero, before calling deflateParams().
729
- Then no more input data should be provided before the deflateParams() call.
730
- If this is done, the old level and strategy will be applied to the data
731
- compressed before deflateParams(), and the new level and strategy will be
732
- applied to the the data compressed after deflateParams().
733
-
734
- deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
735
- state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
736
- there was not enough output space to complete the compression of the
737
- available input data before a change in the strategy or approach. Note that
738
- in the case of a Z_BUF_ERROR, the parameters are not changed. A return
739
- value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
740
- retried with more output space.
668
+ If the compression level is changed, the input available so far is
669
+ compressed with the old level (and may be flushed); the new level will take
670
+ effect only at the next call of deflate().
671
+
672
+ Before the call of deflateParams, the stream state must be set as for
673
+ a call of deflate(), since the currently available input may have to be
674
+ compressed and flushed. In particular, strm->avail_out must be non-zero.
675
+
676
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
677
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
678
+ strm->avail_out was zero.
741
679
  */
742
680
 
743
681
  ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
@@ -855,7 +793,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
855
793
  is for use with other formats that use the deflate compressed data format
856
794
  such as zip. Those formats provide their own check values. If a custom
857
795
  format is developed using the raw deflate format for compressed data, it is
858
- recommended that a check value such as an Adler-32 or a CRC-32 be applied to
796
+ recommended that a check value such as an adler32 or a crc32 be applied to
859
797
  the uncompressed data as is done in the zlib, gzip, and zip formats. For
860
798
  most applications, the zlib format should be used as is. Note that comments
861
799
  above on the use in deflateInit2() applies to the magnitude of windowBits.
@@ -864,10 +802,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
864
802
  32 to windowBits to enable zlib and gzip decoding with automatic header
865
803
  detection, or add 16 to decode only the gzip format (the zlib format will
866
804
  return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
867
- CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
868
- below), inflate() will not automatically decode concatenated gzip streams.
869
- inflate() will return Z_STREAM_END at the end of the gzip stream. The state
870
- would need to be reset to continue decoding a subsequent gzip stream.
805
+ crc32 instead of an adler32.
871
806
 
872
807
  inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
873
808
  memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
@@ -888,7 +823,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
888
823
  Initializes the decompression dictionary from the given uncompressed byte
889
824
  sequence. This function must be called immediately after a call of inflate,
890
825
  if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
891
- can be determined from the Adler-32 value returned by that call of inflate.
826
+ can be determined from the adler32 value returned by that call of inflate.
892
827
  The compressor and decompressor must use exactly the same dictionary (see
893
828
  deflateSetDictionary). For raw inflate, this function can be called at any
894
829
  time to set the dictionary. If the provided dictionary is smaller than the
@@ -899,7 +834,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
899
834
  inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
900
835
  parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
901
836
  inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
902
- expected one (incorrect Adler-32 value). inflateSetDictionary does not
837
+ expected one (incorrect adler32 value). inflateSetDictionary does not
903
838
  perform any decompression: this will be done by subsequent calls of
904
839
  inflate().
905
840
  */
@@ -957,7 +892,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
957
892
  ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
958
893
  /*
959
894
  This function is equivalent to inflateEnd followed by inflateInit,
960
- but does not free and reallocate the internal decompression state. The
895
+ but does not free and reallocate all the internal decompression state. The
961
896
  stream will keep attributes that may have been set by inflateInit2.
962
897
 
963
898
  inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
@@ -969,9 +904,7 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
969
904
  /*
970
905
  This function is the same as inflateReset, but it also permits changing
971
906
  the wrap and window size requests. The windowBits parameter is interpreted
972
- the same as it is for inflateInit2. If the window size is changed, then the
973
- memory allocated for the window is freed, and the window will be reallocated
974
- by inflate() if needed.
907
+ the same as it is for inflateInit2.
975
908
 
976
909
  inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
977
910
  stream state was inconsistent (such as zalloc or state being Z_NULL), or if
@@ -1023,7 +956,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
1023
956
  location in the input stream can be determined from avail_in and data_type
1024
957
  as noted in the description for the Z_BLOCK flush parameter for inflate.
1025
958
 
1026
- inflateMark returns the value noted above, or -65536 if the provided
959
+ inflateMark returns the value noted above or -1 << 16 if the provided
1027
960
  source stream state was inconsistent.
1028
961
  */
1029
962
 
@@ -1115,9 +1048,9 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1115
1048
  This routine would normally be used in a utility that reads zip or gzip
1116
1049
  files and writes out uncompressed files. The utility would decode the
1117
1050
  header and process the trailer on its own, hence this routine expects only
1118
- the raw deflate stream to decompress. This is different from the default
1119
- behavior of inflate(), which expects a zlib header and trailer around the
1120
- deflate stream.
1051
+ the raw deflate stream to decompress. This is different from the normal
1052
+ behavior of inflate(), which expects either a zlib or gzip header and
1053
+ trailer around the deflate stream.
1121
1054
 
1122
1055
  inflateBack() uses two subroutines supplied by the caller that are then
1123
1056
  called by inflateBack() for input and output. inflateBack() calls those
@@ -1126,12 +1059,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1126
1059
  parameters and return types are defined above in the in_func and out_func
1127
1060
  typedefs. inflateBack() will call in(in_desc, &buf) which should return the
1128
1061
  number of bytes of provided input, and a pointer to that input in buf. If
1129
- there is no input available, in() must return zero -- buf is ignored in that
1130
- case -- and inflateBack() will return a buffer error. inflateBack() will
1131
- call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
1132
- out() should return zero on success, or non-zero on failure. If out()
1133
- returns non-zero, inflateBack() will return with an error. Neither in() nor
1134
- out() are permitted to change the contents of the window provided to
1062
+ there is no input available, in() must return zero--buf is ignored in that
1063
+ case--and inflateBack() will return a buffer error. inflateBack() will call
1064
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
1065
+ should return zero on success, or non-zero on failure. If out() returns
1066
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
1067
+ are permitted to change the contents of the window provided to
1135
1068
  inflateBackInit(), which is also the buffer that out() uses to write from.
1136
1069
  The length written by out() will be at most the window size. Any non-zero
1137
1070
  amount of input may be provided by in().
@@ -1159,7 +1092,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1159
1092
  using strm->next_in which will be Z_NULL only if in() returned an error. If
1160
1093
  strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
1161
1094
  non-zero. (in() will always be called before out(), so strm->next_in is
1162
- assured to be defined if out() returns non-zero.) Note that inflateBack()
1095
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
1163
1096
  cannot return Z_OK.
1164
1097
  */
1165
1098
 
@@ -1181,7 +1114,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
1181
1114
  7.6: size of z_off_t
1182
1115
 
1183
1116
  Compiler, assembler, and debug options:
1184
- 8: ZLIB_DEBUG
1117
+ 8: DEBUG
1185
1118
  9: ASMV or ASMINF -- use ASM code
1186
1119
  10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
1187
1120
  11: 0 (reserved)
@@ -1231,8 +1164,7 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
1231
1164
  the byte length of the source buffer. Upon entry, destLen is the total size
1232
1165
  of the destination buffer, which must be at least the value returned by
1233
1166
  compressBound(sourceLen). Upon exit, destLen is the actual size of the
1234
- compressed data. compress() is equivalent to compress2() with a level
1235
- parameter of Z_DEFAULT_COMPRESSION.
1167
+ compressed buffer.
1236
1168
 
1237
1169
  compress returns Z_OK if success, Z_MEM_ERROR if there was not
1238
1170
  enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1248,7 +1180,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
1248
1180
  length of the source buffer. Upon entry, destLen is the total size of the
1249
1181
  destination buffer, which must be at least the value returned by
1250
1182
  compressBound(sourceLen). Upon exit, destLen is the actual size of the
1251
- compressed data.
1183
+ compressed buffer.
1252
1184
 
1253
1185
  compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
1254
1186
  memory, Z_BUF_ERROR if there was not enough room in the output buffer,
@@ -1271,7 +1203,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
1271
1203
  uncompressed data. (The size of the uncompressed data must have been saved
1272
1204
  previously by the compressor and transmitted to the decompressor by some
1273
1205
  mechanism outside the scope of this compression library.) Upon exit, destLen
1274
- is the actual size of the uncompressed data.
1206
+ is the actual size of the uncompressed buffer.
1275
1207
 
1276
1208
  uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
1277
1209
  enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1280,14 +1212,6 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
1280
1212
  buffer with the uncompressed data up to that point.
1281
1213
  */
1282
1214
 
1283
- ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen,
1284
- const Bytef *source, uLong *sourceLen));
1285
- /*
1286
- Same as uncompress, except that sourceLen is a pointer, where the
1287
- length of the source is *sourceLen. On return, *sourceLen is the number of
1288
- source bytes consumed.
1289
- */
1290
-
1291
1215
  /* gzip file access functions */
1292
1216
 
1293
1217
  /*
@@ -1366,9 +1290,10 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1366
1290
  default buffer size is 8192 bytes. This function must be called after
1367
1291
  gzopen() or gzdopen(), and before any other calls that read or write the
1368
1292
  file. The buffer memory allocation is always deferred to the first read or
1369
- write. Three times that size in buffer space is allocated. A larger buffer
1370
- size of, for example, 64K or 128K bytes will noticeably increase the speed
1371
- of decompression (reading).
1293
+ write. Two buffers are allocated, either both of the specified size when
1294
+ writing, or one of the specified size and the other twice that size when
1295
+ reading. A larger buffer size of, for example, 64K or 128K bytes will
1296
+ noticeably increase the speed of decompression (reading).
1372
1297
 
1373
1298
  The new buffer size also affects the maximum length for gzprintf().
1374
1299
 
@@ -1379,12 +1304,10 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1379
1304
  ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
1380
1305
  /*
1381
1306
  Dynamically update the compression level or strategy. See the description
1382
- of deflateInit2 for the meaning of these parameters. Previously provided
1383
- data is flushed before the parameter change.
1307
+ of deflateInit2 for the meaning of these parameters.
1384
1308
 
1385
- gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
1386
- opened for writing, Z_ERRNO if there is an error writing the flushed data,
1387
- or Z_MEM_ERROR if there is a memory allocation error.
1309
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
1310
+ opened for writing.
1388
1311
  */
1389
1312
 
1390
1313
  ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
@@ -1412,35 +1335,7 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
1412
1335
  case.
1413
1336
 
1414
1337
  gzread returns the number of uncompressed bytes actually read, less than
1415
- len for end of file, or -1 for error. If len is too large to fit in an int,
1416
- then nothing is read, -1 is returned, and the error state is set to
1417
- Z_STREAM_ERROR.
1418
- */
1419
-
1420
- ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
1421
- gzFile file));
1422
- /*
1423
- Read up to nitems items of size size from file to buf, otherwise operating
1424
- as gzread() does. This duplicates the interface of stdio's fread(), with
1425
- size_t request and return types. If the library defines size_t, then
1426
- z_size_t is identical to size_t. If not, then z_size_t is an unsigned
1427
- integer type that can contain a pointer.
1428
-
1429
- gzfread() returns the number of full items read of size size, or zero if
1430
- the end of the file was reached and a full item could not be read, or if
1431
- there was an error. gzerror() must be consulted if zero is returned in
1432
- order to determine if there was an error. If the multiplication of size and
1433
- nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
1434
- is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
1435
-
1436
- In the event that the end of file is reached and only a partial item is
1437
- available at the end, i.e. the remaining uncompressed data length is not a
1438
- multiple of size, then the final partial item is nevetheless read into buf
1439
- and the end-of-file flag is set. The length of the partial item read is not
1440
- provided, but could be inferred from the result of gztell(). This behavior
1441
- is the same as the behavior of fread() implementations in common libraries,
1442
- but it prevents the direct use of gzfread() to read a concurrently written
1443
- file, reseting and retrying on end-of-file, when size is not 1.
1338
+ len for end of file, or -1 for error.
1444
1339
  */
1445
1340
 
1446
1341
  ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
@@ -1451,33 +1346,19 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
1451
1346
  error.
1452
1347
  */
1453
1348
 
1454
- ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
1455
- z_size_t nitems, gzFile file));
1456
- /*
1457
- gzfwrite() writes nitems items of size size from buf to file, duplicating
1458
- the interface of stdio's fwrite(), with size_t request and return types. If
1459
- the library defines size_t, then z_size_t is identical to size_t. If not,
1460
- then z_size_t is an unsigned integer type that can contain a pointer.
1461
-
1462
- gzfwrite() returns the number of full items written of size size, or zero
1463
- if there was an error. If the multiplication of size and nitems overflows,
1464
- i.e. the product does not fit in a z_size_t, then nothing is written, zero
1465
- is returned, and the error state is set to Z_STREAM_ERROR.
1466
- */
1467
-
1468
1349
  ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
1469
1350
  /*
1470
1351
  Converts, formats, and writes the arguments to the compressed file under
1471
1352
  control of the format string, as in fprintf. gzprintf returns the number of
1472
- uncompressed bytes actually written, or a negative zlib error code in case
1473
- of error. The number of uncompressed bytes written is limited to 8191, or
1474
- one less than the buffer size given to gzbuffer(). The caller should assure
1475
- that this limit is not exceeded. If it is exceeded, then gzprintf() will
1476
- return an error (0) with nothing written. In this case, there may also be a
1477
- buffer overflow with unpredictable consequences, which is possible only if
1478
- zlib was compiled with the insecure functions sprintf() or vsprintf()
1479
- because the secure snprintf() or vsnprintf() functions were not available.
1480
- This can be determined using zlibCompileFlags().
1353
+ uncompressed bytes actually written, or 0 in case of error. The number of
1354
+ uncompressed bytes written is limited to 8191, or one less than the buffer
1355
+ size given to gzbuffer(). The caller should assure that this limit is not
1356
+ exceeded. If it is exceeded, then gzprintf() will return an error (0) with
1357
+ nothing written. In this case, there may also be a buffer overflow with
1358
+ unpredictable consequences, which is possible only if zlib was compiled with
1359
+ the insecure functions sprintf() or vsprintf() because the secure snprintf()
1360
+ or vsnprintf() functions were not available. This can be determined using
1361
+ zlibCompileFlags().
1481
1362
  */
1482
1363
 
1483
1364
  ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
@@ -1537,7 +1418,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
1537
1418
  If the flush parameter is Z_FINISH, the remaining data is written and the
1538
1419
  gzip stream is completed in the output. If gzwrite() is called again, a new
1539
1420
  gzip stream will be started in the output. gzread() is able to read such
1540
- concatenated gzip streams.
1421
+ concatented gzip streams.
1541
1422
 
1542
1423
  gzflush should be called only when strictly necessary because it will
1543
1424
  degrade compression if called too often.
@@ -1691,7 +1572,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
1691
1572
  return the updated checksum. If buf is Z_NULL, this function returns the
1692
1573
  required initial value for the checksum.
1693
1574
 
1694
- An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
1575
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
1695
1576
  much faster.
1696
1577
 
1697
1578
  Usage example:
@@ -1704,12 +1585,6 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
1704
1585
  if (adler != original_adler) error();
1705
1586
  */
1706
1587
 
1707
- ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
1708
- z_size_t len));
1709
- /*
1710
- Same as adler32(), but with a size_t length.
1711
- */
1712
-
1713
1588
  /*
1714
1589
  ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
1715
1590
  z_off_t len2));
@@ -1739,12 +1614,6 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
1739
1614
  if (crc != original_crc) error();
1740
1615
  */
1741
1616
 
1742
- ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf,
1743
- z_size_t len));
1744
- /*
1745
- Same as crc32(), but with a size_t length.
1746
- */
1747
-
1748
1617
  /*
1749
1618
  ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
1750
1619
 
@@ -1775,35 +1644,19 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
1775
1644
  unsigned char FAR *window,
1776
1645
  const char *version,
1777
1646
  int stream_size));
1778
- #ifdef Z_PREFIX_SET
1779
- # define z_deflateInit(strm, level) \
1780
- deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
1781
- # define z_inflateInit(strm) \
1782
- inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
1783
- # define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
1784
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
1785
- (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
1786
- # define z_inflateInit2(strm, windowBits) \
1787
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
1788
- (int)sizeof(z_stream))
1789
- # define z_inflateBackInit(strm, windowBits, window) \
1790
- inflateBackInit_((strm), (windowBits), (window), \
1791
- ZLIB_VERSION, (int)sizeof(z_stream))
1792
- #else
1793
- # define deflateInit(strm, level) \
1794
- deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
1795
- # define inflateInit(strm) \
1796
- inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
1797
- # define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
1798
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
1799
- (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
1800
- # define inflateInit2(strm, windowBits) \
1801
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
1802
- (int)sizeof(z_stream))
1803
- # define inflateBackInit(strm, windowBits, window) \
1804
- inflateBackInit_((strm), (windowBits), (window), \
1805
- ZLIB_VERSION, (int)sizeof(z_stream))
1806
- #endif
1647
+ #define deflateInit(strm, level) \
1648
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
1649
+ #define inflateInit(strm) \
1650
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
1651
+ #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
1652
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
1653
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
1654
+ #define inflateInit2(strm, windowBits) \
1655
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
1656
+ (int)sizeof(z_stream))
1657
+ #define inflateBackInit(strm, windowBits, window) \
1658
+ inflateBackInit_((strm), (windowBits), (window), \
1659
+ ZLIB_VERSION, (int)sizeof(z_stream))
1807
1660
 
1808
1661
  #ifndef Z_SOLO
1809
1662
 
@@ -1823,10 +1676,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
1823
1676
  #ifdef Z_PREFIX_SET
1824
1677
  # undef z_gzgetc
1825
1678
  # define z_gzgetc(g) \
1826
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
1679
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
1827
1680
  #else
1828
1681
  # define gzgetc(g) \
1829
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
1682
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
1830
1683
  #endif
1831
1684
 
1832
1685
  /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
@@ -1884,16 +1737,19 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
1884
1737
 
1885
1738
  #endif /* !Z_SOLO */
1886
1739
 
1740
+ /* hack for buggy compilers */
1741
+ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
1742
+ struct internal_state {int dummy;};
1743
+ #endif
1744
+
1887
1745
  /* undocumented functions */
1888
1746
  ZEXTERN const char * ZEXPORT zError OF((int));
1889
1747
  ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
1890
1748
  ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
1891
1749
  ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
1892
- ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int));
1893
- ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp));
1894
1750
  ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
1895
1751
  ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
1896
- #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO)
1752
+ #if defined(_WIN32) && !defined(Z_SOLO)
1897
1753
  ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
1898
1754
  const char *mode));
1899
1755
  #endif