summaryrefslogtreecommitdiff
path: root/doc/api/zlib.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r--doc/api/zlib.md76
1 files changed, 69 insertions, 7 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md
index e6c5504bff..89ce111e22 100644
--- a/doc/api/zlib.md
+++ b/doc/api/zlib.md
@@ -428,6 +428,8 @@ as appropriate for the derived class).
added: v0.9.4
-->
+* `callback` {Function}
+
Close the underlying handle.
### zlib.flush([kind], callback)
@@ -436,6 +438,7 @@ added: v0.5.8
-->
* `kind` **Default:** `zlib.constants.Z_FULL_FLUSH`
+* `callback` {Function}
Flush pending data. Don't call this frivolously, premature flushes negatively
impact the effectiveness of the compression algorithm.
@@ -450,6 +453,10 @@ writes and will only produce output when data is being read from the stream.
added: v0.11.4
-->
+* `level` {integer}
+* `strategy` {integer}
+* `callback` {Function}
+
Dynamically update the compression level and compression strategy.
Only applicable to deflate algorithm.
@@ -473,6 +480,8 @@ Provides an object enumerating Zlib-related constants.
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`Deflate`][] object with the given [`options`][].
## zlib.createDeflateRaw([options])
@@ -480,6 +489,8 @@ Creates and returns a new [`Deflate`][] object with the given [`options`][].
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`DeflateRaw`][] object with the given [`options`][].
An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`
@@ -494,6 +505,8 @@ that effectively uses an 8-bit window only.
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`Gunzip`][] object with the given [`options`][].
## zlib.createGzip([options])
@@ -501,6 +514,8 @@ Creates and returns a new [`Gunzip`][] object with the given [`options`][].
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`Gzip`][] object with the given [`options`][].
## zlib.createInflate([options])
@@ -508,6 +523,8 @@ Creates and returns a new [`Gzip`][] object with the given [`options`][].
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`Inflate`][] object with the given [`options`][].
## zlib.createInflateRaw([options])
@@ -515,6 +532,8 @@ Creates and returns a new [`Inflate`][] object with the given [`options`][].
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`InflateRaw`][] object with the given [`options`][].
## zlib.createUnzip([options])
@@ -522,6 +541,8 @@ Creates and returns a new [`InflateRaw`][] object with the given [`options`][].
added: v0.5.8
-->
+* `options` {Object}
+
Creates and returns a new [`Unzip`][] object with the given [`options`][].
## Convenience Methods
@@ -550,6 +571,10 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.deflateSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -565,7 +590,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Compress a chunk of data with [`Deflate`][].
@@ -580,6 +606,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.deflateRawSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -595,7 +626,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Compress a chunk of data with [`DeflateRaw`][].
@@ -613,6 +645,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.gunzipSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -628,7 +665,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Decompress a chunk of data with [`Gunzip`][].
@@ -646,6 +684,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.gzipSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -661,7 +704,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Compress a chunk of data with [`Gzip`][].
@@ -679,6 +723,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.inflateSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -694,7 +743,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Decompress a chunk of data with [`Inflate`][].
@@ -712,6 +762,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.inflateRawSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -727,7 +782,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Decompress a chunk of data with [`InflateRaw`][].
@@ -745,6 +801,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an `Uint8Array` now.
-->
+
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
+* `callback` {Function}
+
### zlib.unzipSync(buffer[, options])
<!-- YAML
added: v0.11.12
@@ -760,7 +821,8 @@ changes:
description: The `buffer` parameter can be an `Uint8Array` now.
-->
-- `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `buffer` {Buffer|TypedArray|DataView|ArrayBuffer|string}
+* `options` {Object}
Decompress a chunk of data with [`Unzip`][].