summaryrefslogtreecommitdiff
path: root/doc/api/zlib.md
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2017-04-03 18:15:13 -0700
committerTimothy Gu <timothygu99@gmail.com>2017-04-12 10:03:26 -0700
commit2ced07ccaf7682b9ec8fb3bcc3dc8d2bb2798c61 (patch)
tree31245a1e2025264acf2216876c9e190addd44287 /doc/api/zlib.md
parenta8f460f12d81f63d95b3f1bc12a89e36cae2b271 (diff)
downloadandroid-node-v8-2ced07ccaf7682b9ec8fb3bcc3dc8d2bb2798c61.tar.gz
android-node-v8-2ced07ccaf7682b9ec8fb3bcc3dc8d2bb2798c61.tar.bz2
android-node-v8-2ced07ccaf7682b9ec8fb3bcc3dc8d2bb2798c61.zip
zlib: support all ArrayBufferView types
PR-URL: https://github.com/nodejs/node/pull/12223 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r--doc/api/zlib.md69
1 files changed, 56 insertions, 13 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md
index 928070d577..a91456bb0b 100644
--- a/doc/api/zlib.md
+++ b/doc/api/zlib.md
@@ -300,7 +300,7 @@ ignored by the decompression classes.
* `level` {integer} (compression only)
* `memLevel` {integer} (compression only)
* `strategy` {integer} (compression only)
-* `dictionary` {Buffer|Uint8Array} (deflate/inflate only, empty dictionary by
+* `dictionary` {Buffer|TypedArray|DataView} (deflate/inflate only, empty dictionary by
default)
See the description of `deflateInit2` and `inflateInit2` at
@@ -477,9 +477,9 @@ Returns a new [Unzip][] object with an [options][].
<!--type=misc-->
-All of these take a [Buffer][], [Uint8Array][], or string as the first
-argument, an optional second argument to supply options to the `zlib` classes
-and will call the supplied callback with `callback(error, result)`.
+All of these take a [`Buffer`][], [`TypedArray`][], [`DataView`][], or string as
+the first argument, an optional second argument to supply options to the `zlib`
+classes and will call the supplied callback with `callback(error, result)`.
Every method has a `*Sync` counterpart, which accept the same arguments, but
without a callback.
@@ -489,6 +489,9 @@ without a callback.
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -497,11 +500,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Compress a chunk of data with [Deflate][].
@@ -510,6 +516,9 @@ Compress a chunk of data with [Deflate][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -518,11 +527,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Compress a chunk of data with [DeflateRaw][].
@@ -531,6 +543,9 @@ Compress a chunk of data with [DeflateRaw][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -539,11 +554,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Decompress a chunk of data with [Gunzip][].
@@ -552,6 +570,9 @@ Decompress a chunk of data with [Gunzip][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -560,11 +581,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Compress a chunk of data with [Gzip][].
@@ -573,6 +597,9 @@ Compress a chunk of data with [Gzip][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -581,11 +608,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Decompress a chunk of data with [Inflate][].
@@ -594,6 +624,9 @@ Decompress a chunk of data with [Inflate][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -602,11 +635,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Decompress a chunk of data with [InflateRaw][].
@@ -615,6 +651,9 @@ Decompress a chunk of data with [InflateRaw][].
added: v0.6.0
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
@@ -623,11 +662,14 @@ changes:
added: v0.11.12
changes:
- version: REPLACEME
+ pr-url: REPLACEME
+ description: The `buffer` parameter can be any TypedArray or DataView now.
+ - version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/12001
description: The `buffer` parameter can be an Uint8Array now.
-->
-- `buffer` {Buffer|Uint8Array|string}
+- `buffer` {Buffer|TypedArray|DataView|string}
Decompress a chunk of data with [Unzip][].
@@ -644,5 +686,6 @@ Decompress a chunk of data with [Unzip][].
[InflateRaw]: #zlib_class_zlib_inflateraw
[Unzip]: #zlib_class_zlib_unzip
[`.flush()`]: #zlib_zlib_flush_kind_callback
-[Buffer]: buffer.html
-[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
+[`Buffer`]: buffer.html#buffer_class_buffer
+[`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
+[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray