@@ -278,6 +278,9 @@ Compression strategy.
278278<!-- YAML
279279added: v0.11.1
280280changes:
281+ - version: REPLACEME
282+ pr-url: https://github.com/nodejs/node/pull/12001
283+ description: The `dictionary` option can be an Uint8Array now.
281284 - version: v5.11.0
282285 pr-url: https://github.com/nodejs/node/pull/6069
283286 description: The `finishFlush` option is supported now.
@@ -290,14 +293,15 @@ Each class takes an `options` object. All options are optional.
290293Note that some options are only relevant when compressing, and are
291294ignored by the decompression classes.
292295
293- * ` flush ` (default: ` zlib.constants.Z_NO_FLUSH ` )
294- * ` finishFlush ` (default: ` zlib.constants.Z_FINISH ` )
295- * ` chunkSize ` (default: 16* 1024)
296- * ` windowBits `
297- * ` level ` (compression only)
298- * ` memLevel ` (compression only)
299- * ` strategy ` (compression only)
300- * ` dictionary ` (deflate/inflate only, empty dictionary by default)
296+ * ` flush ` {integer} (default: ` zlib.constants.Z_NO_FLUSH ` )
297+ * ` finishFlush ` {integer} (default: ` zlib.constants.Z_FINISH ` )
298+ * ` chunkSize ` {integer} (default: 16\* 1024)
299+ * ` windowBits ` {integer}
300+ * ` level ` {integer} (compression only)
301+ * ` memLevel ` {integer} (compression only)
302+ * ` strategy ` {integer} (compression only)
303+ * ` dictionary ` {Buffer|Uint8Array} (deflate/inflate only, empty dictionary by
304+ default)
301305
302306See the description of ` deflateInit2 ` and ` inflateInit2 ` at
303307< http://zlib.net/manual.html#Advanced > for more information on these.
@@ -473,89 +477,159 @@ Returns a new [Unzip][] object with an [options][].
473477
474478<!-- type=misc-->
475479
476- All of these take a [ Buffer] [ ] or string as the first argument, an optional
477- second argument to supply options to the ` zlib ` classes and will call the
478- supplied callback with ` callback(error, result) ` .
480+ All of these take a [ Buffer] [ ] , [ Uint8Array ] [ ] , or string as the first
481+ argument, an optional second argument to supply options to the ` zlib ` classes
482+ and will call the supplied callback with ` callback(error, result) ` .
479483
480484Every method has a ` *Sync ` counterpart, which accept the same arguments, but
481485without a callback.
482486
483- ### zlib.deflate(buf [ , options] , callback)
487+ ### zlib.deflate(buffer [ , options] , callback)
484488<!-- YAML
485489added: v0.6.0
490+ changes:
491+ - version: REPLACEME
492+ pr-url: https://github.com/nodejs/node/pull/12001
493+ description: The `buffer` parameter can be an Uint8Array now.
486494-->
487- ### zlib.deflateSync(buf [ , options] )
495+ ### zlib.deflateSync(buffer [ , options] )
488496<!-- YAML
489497added: v0.11.12
498+ changes:
499+ - version: REPLACEME
500+ pr-url: https://github.com/nodejs/node/pull/12001
501+ description: The `buffer` parameter can be an Uint8Array now.
490502-->
491503
492- Compress a [ Buffer] [ ] or string with [ Deflate] [ ] .
504+ - ` buffer ` {Buffer|Uint8Array|string}
505+
506+ Compress a chunk of data with [ Deflate] [ ] .
493507
494- ### zlib.deflateRaw(buf [ , options] , callback)
508+ ### zlib.deflateRaw(buffer [ , options] , callback)
495509<!-- YAML
496510added: v0.6.0
511+ changes:
512+ - version: REPLACEME
513+ pr-url: https://github.com/nodejs/node/pull/12001
514+ description: The `buffer` parameter can be an Uint8Array now.
497515-->
498- ### zlib.deflateRawSync(buf [ , options] )
516+ ### zlib.deflateRawSync(buffer [ , options] )
499517<!-- YAML
500518added: v0.11.12
519+ changes:
520+ - version: REPLACEME
521+ pr-url: https://github.com/nodejs/node/pull/12001
522+ description: The `buffer` parameter can be an Uint8Array now.
501523-->
502524
503- Compress a [ Buffer] [ ] or string with [ DeflateRaw] [ ] .
525+ - ` buffer ` {Buffer|Uint8Array|string}
526+
527+ Compress a chunk of data with [ DeflateRaw] [ ] .
504528
505- ### zlib.gunzip(buf [ , options] , callback)
529+ ### zlib.gunzip(buffer [ , options] , callback)
506530<!-- YAML
507531added: v0.6.0
532+ changes:
533+ - version: REPLACEME
534+ pr-url: https://github.com/nodejs/node/pull/12001
535+ description: The `buffer` parameter can be an Uint8Array now.
508536-->
509- ### zlib.gunzipSync(buf [ , options] )
537+ ### zlib.gunzipSync(buffer [ , options] )
510538<!-- YAML
511539added: v0.11.12
540+ changes:
541+ - version: REPLACEME
542+ pr-url: https://github.com/nodejs/node/pull/12001
543+ description: The `buffer` parameter can be an Uint8Array now.
512544-->
513545
514- Decompress a [ Buffer] [ ] or string with [ Gunzip] [ ] .
546+ - ` buffer ` {Buffer|Uint8Array|string}
547+
548+ Decompress a chunk of data with [ Gunzip] [ ] .
515549
516- ### zlib.gzip(buf [ , options] , callback)
550+ ### zlib.gzip(buffer [ , options] , callback)
517551<!-- YAML
518552added: v0.6.0
553+ changes:
554+ - version: REPLACEME
555+ pr-url: https://github.com/nodejs/node/pull/12001
556+ description: The `buffer` parameter can be an Uint8Array now.
519557-->
520- ### zlib.gzipSync(buf [ , options] )
558+ ### zlib.gzipSync(buffer [ , options] )
521559<!-- YAML
522560added: v0.11.12
561+ changes:
562+ - version: REPLACEME
563+ pr-url: https://github.com/nodejs/node/pull/12001
564+ description: The `buffer` parameter can be an Uint8Array now.
523565-->
524566
525- Compress a [ Buffer] [ ] or string with [ Gzip ] [ ] .
567+ - ` buffer ` { Buffer|Uint8Array| string}
526568
527- ### zlib.inflate(buf[ , options] , callback)
569+ Compress a chunk of data with [ Gzip] [ ] .
570+
571+ ### zlib.inflate(buffer[ , options] , callback)
528572<!-- YAML
529573added: v0.6.0
574+ changes:
575+ - version: REPLACEME
576+ pr-url: https://github.com/nodejs/node/pull/12001
577+ description: The `buffer` parameter can be an Uint8Array now.
530578-->
531- ### zlib.inflateSync(buf [ , options] )
579+ ### zlib.inflateSync(buffer [ , options] )
532580<!-- YAML
533581added: v0.11.12
582+ changes:
583+ - version: REPLACEME
584+ pr-url: https://github.com/nodejs/node/pull/12001
585+ description: The `buffer` parameter can be an Uint8Array now.
534586-->
535587
536- Decompress a [ Buffer] [ ] or string with [ Inflate ] [ ] .
588+ - ` buffer ` { Buffer|Uint8Array| string}
537589
538- ### zlib.inflateRaw(buf[ , options] , callback)
590+ Decompress a chunk of data with [ Inflate] [ ] .
591+
592+ ### zlib.inflateRaw(buffer[ , options] , callback)
539593<!-- YAML
540594added: v0.6.0
595+ changes:
596+ - version: REPLACEME
597+ pr-url: https://github.com/nodejs/node/pull/12001
598+ description: The `buffer` parameter can be an Uint8Array now.
541599-->
542- ### zlib.inflateRawSync(buf [ , options] )
600+ ### zlib.inflateRawSync(buffer [ , options] )
543601<!-- YAML
544602added: v0.11.12
603+ changes:
604+ - version: REPLACEME
605+ pr-url: https://github.com/nodejs/node/pull/12001
606+ description: The `buffer` parameter can be an Uint8Array now.
545607-->
546608
547- Decompress a [ Buffer] [ ] or string with [ InflateRaw] [ ] .
609+ - ` buffer ` {Buffer|Uint8Array|string}
610+
611+ Decompress a chunk of data with [ InflateRaw] [ ] .
548612
549- ### zlib.unzip(buf [ , options] , callback)
613+ ### zlib.unzip(buffer [ , options] , callback)
550614<!-- YAML
551615added: v0.6.0
616+ changes:
617+ - version: REPLACEME
618+ pr-url: https://github.com/nodejs/node/pull/12001
619+ description: The `buffer` parameter can be an Uint8Array now.
552620-->
553- ### zlib.unzipSync(buf [ , options] )
621+ ### zlib.unzipSync(buffer [ , options] )
554622<!-- YAML
555623added: v0.11.12
624+ changes:
625+ - version: REPLACEME
626+ pr-url: https://github.com/nodejs/node/pull/12001
627+ description: The `buffer` parameter can be an Uint8Array now.
556628-->
557629
558- Decompress a [ Buffer] [ ] or string with [ Unzip] [ ] .
630+ - ` buffer ` {Buffer|Uint8Array|string}
631+
632+ Decompress a chunk of data with [ Unzip] [ ] .
559633
560634[ `Accept-Encoding` ] : https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3
561635[ `Content-Encoding` ] : https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
@@ -571,3 +645,4 @@ Decompress a [Buffer][] or string with [Unzip][].
571645[ Unzip ] : #zlib_class_zlib_unzip
572646[ `.flush()` ] : #zlib_zlib_flush_kind_callback
573647[ Buffer ] : buffer.html
648+ [ Uint8Array ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
0 commit comments