@@ -103,159 +103,6 @@ tradeoffs involved in zlib usage.
103
103
}
104
104
}).listen(1337);
105
105
106
- ## zlib.createGzip([ options] )
107
-
108
- Returns a new [ Gzip] ( #zlib_class_zlib_gzip ) object with an
109
- [ options] ( #zlib_options ) .
110
-
111
- ## zlib.createGunzip([ options] )
112
-
113
- Returns a new [ Gunzip] ( #zlib_class_zlib_gunzip ) object with an
114
- [ options] ( #zlib_options ) .
115
-
116
- ## zlib.createDeflate([ options] )
117
-
118
- Returns a new [ Deflate] ( #zlib_class_zlib_deflate ) object with an
119
- [ options] ( #zlib_options ) .
120
-
121
- ## zlib.createInflate([ options] )
122
-
123
- Returns a new [ Inflate] ( #zlib_class_zlib_inflate ) object with an
124
- [ options] ( #zlib_options ) .
125
-
126
- ## zlib.createDeflateRaw([ options] )
127
-
128
- Returns a new [ DeflateRaw] ( #zlib_class_zlib_deflateraw ) object with an
129
- [ options] ( #zlib_options ) .
130
-
131
- ## zlib.createInflateRaw([ options] )
132
-
133
- Returns a new [ InflateRaw] ( #zlib_class_zlib_inflateraw ) object with an
134
- [ options] ( #zlib_options ) .
135
-
136
- ## zlib.createUnzip([ options] )
137
-
138
- Returns a new [ Unzip] ( #zlib_class_zlib_unzip ) object with an
139
- [ options] ( #zlib_options ) .
140
-
141
-
142
- ## Class: zlib.Zlib
143
-
144
- Not exported by the ` zlib ` module. It is documented here because it is the base
145
- class of the compressor/decompressor classes.
146
-
147
- ### zlib.flush([ kind] , callback)
148
-
149
- ` kind ` defaults to ` zlib.Z_FULL_FLUSH ` .
150
-
151
- Flush pending data. Don't call this frivolously, premature flushes negatively
152
- impact the effectiveness of the compression algorithm.
153
-
154
- ### zlib.params(level, strategy, callback)
155
-
156
- Dynamically update the compression level and compression strategy.
157
- Only applicable to deflate algorithm.
158
-
159
- ### zlib.reset()
160
-
161
- Reset the compressor/decompressor to factory defaults. Only applicable to
162
- the inflate and deflate algorithms.
163
-
164
- ## Class: zlib.Gzip
165
-
166
- Compress data using gzip.
167
-
168
- ## Class: zlib.Gunzip
169
-
170
- Decompress a gzip stream.
171
-
172
- ## Class: zlib.Deflate
173
-
174
- Compress data using deflate.
175
-
176
- ## Class: zlib.Inflate
177
-
178
- Decompress a deflate stream.
179
-
180
- ## Class: zlib.DeflateRaw
181
-
182
- Compress data using deflate, and do not append a zlib header.
183
-
184
- ## Class: zlib.InflateRaw
185
-
186
- Decompress a raw deflate stream.
187
-
188
- ## Class: zlib.Unzip
189
-
190
- Decompress either a Gzip- or Deflate-compressed stream by auto-detecting
191
- the header.
192
-
193
- ## Convenience Methods
194
-
195
- <!-- type=misc-->
196
-
197
- All of these take a string or buffer as the first argument, an optional second
198
- argument to supply options to the zlib classes and will call the supplied
199
- callback with ` callback(error, result) ` .
200
-
201
- Every method has a ` *Sync ` counterpart, which accept the same arguments, but
202
- without a callback.
203
-
204
- ## zlib.deflate(buf[ , options] , callback)
205
- ## zlib.deflateSync(buf[ , options] )
206
-
207
- Compress a string with Deflate.
208
-
209
- ## zlib.deflateRaw(buf[ , options] , callback)
210
- ## zlib.deflateRawSync(buf[ , options] )
211
-
212
- Compress a string with DeflateRaw.
213
-
214
- ## zlib.gzip(buf[ , options] , callback)
215
- ## zlib.gzipSync(buf[ , options] )
216
-
217
- Compress a string with Gzip.
218
-
219
- ## zlib.gunzip(buf[ , options] , callback)
220
- ## zlib.gunzipSync(buf[ , options] )
221
-
222
- Decompress a raw Buffer with Gunzip.
223
-
224
- ## zlib.inflate(buf[ , options] , callback)
225
- ## zlib.inflateSync(buf[ , options] )
226
-
227
- Decompress a raw Buffer with Inflate.
228
-
229
- ## zlib.inflateRaw(buf[ , options] , callback)
230
- ## zlib.inflateRawSync(buf[ , options] )
231
-
232
- Decompress a raw Buffer with InflateRaw.
233
-
234
- ## zlib.unzip(buf[ , options] , callback)
235
- ## zlib.unzipSync(buf[ , options] )
236
-
237
- Decompress a raw Buffer with Unzip.
238
-
239
- ## Options
240
-
241
- <!-- type=misc-->
242
-
243
- Each class takes an options object. All options are optional.
244
-
245
- Note that some options are only relevant when compressing, and are
246
- ignored by the decompression classes.
247
-
248
- * flush (default: ` zlib.Z_NO_FLUSH ` )
249
- * chunkSize (default: 16* 1024)
250
- * windowBits
251
- * level (compression only)
252
- * memLevel (compression only)
253
- * strategy (compression only)
254
- * dictionary (deflate/inflate only, empty dictionary by default)
255
-
256
- See the description of ` deflateInit2 ` and ` inflateInit2 ` at
257
- < http://zlib.net/manual.html#Advanced > for more information on these.
258
-
259
106
## Memory Usage Tuning
260
107
261
108
<!-- type=misc-->
@@ -361,3 +208,161 @@ The deflate compression method (the only one supported in this version).
361
208
For initializing zalloc, zfree, opaque.
362
209
363
210
* ` zlib.Z_NULL `
211
+
212
+ ## Class Options
213
+
214
+ <!-- type=misc-->
215
+
216
+ Each class takes an options object. All options are optional.
217
+
218
+ Note that some options are only relevant when compressing, and are
219
+ ignored by the decompression classes.
220
+
221
+ * flush (default: ` zlib.Z_NO_FLUSH ` )
222
+ * chunkSize (default: 16* 1024)
223
+ * windowBits
224
+ * level (compression only)
225
+ * memLevel (compression only)
226
+ * strategy (compression only)
227
+ * dictionary (deflate/inflate only, empty dictionary by default)
228
+
229
+ See the description of ` deflateInit2 ` and ` inflateInit2 ` at
230
+ < http://zlib.net/manual.html#Advanced > for more information on these.
231
+
232
+ ## Class: zlib.Deflate
233
+
234
+ Compress data using deflate.
235
+
236
+ ## Class: zlib.DeflateRaw
237
+
238
+ Compress data using deflate, and do not append a zlib header.
239
+
240
+ ## Class: zlib.Gunzip
241
+
242
+ Decompress a gzip stream.
243
+
244
+ ## Class: zlib.Gzip
245
+
246
+ Compress data using gzip.
247
+
248
+ ## Class: zlib.Inflate
249
+
250
+ Decompress a deflate stream.
251
+
252
+ ## Class: zlib.InflateRaw
253
+
254
+ Decompress a raw deflate stream.
255
+
256
+ ## Class: zlib.Unzip
257
+
258
+ Decompress either a Gzip- or Deflate-compressed stream by auto-detecting
259
+ the header.
260
+
261
+ ## Class: zlib.Zlib
262
+
263
+ Not exported by the ` zlib ` module. It is documented here because it is the base
264
+ class of the compressor/decompressor classes.
265
+
266
+ ### zlib.flush([ kind] , callback)
267
+
268
+ ` kind ` defaults to ` zlib.Z_FULL_FLUSH ` .
269
+
270
+ Flush pending data. Don't call this frivolously, premature flushes negatively
271
+ impact the effectiveness of the compression algorithm.
272
+
273
+ ### zlib.params(level, strategy, callback)
274
+
275
+ Dynamically update the compression level and compression strategy.
276
+ Only applicable to deflate algorithm.
277
+
278
+ ### zlib.reset()
279
+
280
+ Reset the compressor/decompressor to factory defaults. Only applicable to
281
+ the inflate and deflate algorithms.
282
+
283
+ ## zlib.createDeflate([ options] )
284
+
285
+ Returns a new [ Deflate] ( #zlib_class_zlib_deflate ) object with an
286
+ [ options] ( #zlib_options ) .
287
+
288
+ ## zlib.createDeflateRaw([ options] )
289
+
290
+ Returns a new [ DeflateRaw] ( #zlib_class_zlib_deflateraw ) object with an
291
+ [ options] ( #zlib_options ) .
292
+
293
+ ## zlib.createGunzip([ options] )
294
+
295
+ Returns a new [ Gunzip] ( #zlib_class_zlib_gunzip ) object with an
296
+ [ options] ( #zlib_options ) .
297
+
298
+ ## zlib.createGzip([ options] )
299
+
300
+ Returns a new [ Gzip] ( #zlib_class_zlib_gzip ) object with an
301
+ [ options] ( #zlib_options ) .
302
+
303
+ ## zlib.createInflate([ options] )
304
+
305
+ Returns a new [ Inflate] ( #zlib_class_zlib_inflate ) object with an
306
+ [ options] ( #zlib_options ) .
307
+
308
+ ## zlib.createInflateRaw([ options] )
309
+
310
+ Returns a new [ InflateRaw] ( #zlib_class_zlib_inflateraw ) object with an
311
+ [ options] ( #zlib_options ) .
312
+
313
+ ## zlib.createUnzip([ options] )
314
+
315
+ Returns a new [ Unzip] ( #zlib_class_zlib_unzip ) object with an
316
+ [ options] ( #zlib_options ) .
317
+
318
+ ## Convenience Methods
319
+
320
+ <!-- type=misc-->
321
+
322
+ All of these take a string or buffer as the first argument, an optional second
323
+ argument to supply options to the zlib classes and will call the supplied
324
+ callback with ` callback(error, result) ` .
325
+
326
+ Every method has a ` *Sync ` counterpart, which accept the same arguments, but
327
+ without a callback.
328
+
329
+ ### zlib.deflate(buf[ , options] , callback)
330
+
331
+ Compress a string with Deflate.
332
+
333
+ ### zlib.deflateRaw(buf[ , options] , callback)
334
+ ### zlib.deflateRawSync(buf[ , options] )
335
+
336
+ Compress a string with DeflateRaw.
337
+
338
+ ### zlib.deflateSync(buf[ , options] )
339
+
340
+ Compress a string with Deflate.
341
+
342
+ ### zlib.gunzip(buf[ , options] , callback)
343
+ ### zlib.gunzipSync(buf[ , options] )
344
+
345
+ Decompress a raw Buffer with Gunzip.
346
+
347
+ ### zlib.gzip(buf[ , options] , callback)
348
+ ### zlib.gzipSync(buf[ , options] )
349
+
350
+ Compress a string with Gzip.
351
+
352
+ ### zlib.inflate(buf[ , options] , callback)
353
+
354
+ Decompress a raw Buffer with Inflate.
355
+
356
+ ### zlib.inflateRaw(buf[ , options] , callback)
357
+ ### zlib.inflateRawSync(buf[ , options] )
358
+
359
+ Decompress a raw Buffer with InflateRaw.
360
+
361
+ ### zlib.inflateSync(buf[ , options] )
362
+
363
+ Decompress a raw Buffer with Inflate.
364
+
365
+ ### zlib.unzip(buf[ , options] , callback)
366
+ ### zlib.unzipSync(buf[ , options] )
367
+
368
+ Decompress a raw Buffer with Unzip.
0 commit comments