Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <rosaxny@gmail.com>2020-05-22 20:22:09 +0300
committerAnna Henningsen <anna@addaleax.net>2020-06-09 18:26:10 +0300
commit278aae28e14da89e6bd6d91c07ded2dc5f8fe8c3 (patch)
treee1ef4a404b91893577de332d9a8e9da1a4ff484a /doc/api/zlib.md
parent4678e44bb28c00dc22771a0ef2684a4d46715ab0 (diff)
zlib: add `maxOutputLength` option
Fixes: https://github.com/nodejs/node/issues/27253 PR-URL: https://github.com/nodejs/node/pull/33516 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r--doc/api/zlib.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md
index 079efeb6a10..f845ce5e526 100644
--- a/doc/api/zlib.md
+++ b/doc/api/zlib.md
@@ -486,6 +486,9 @@ These advanced options are available for controlling decompression:
<!-- YAML
added: v0.11.1
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/33516
+ description: The `maxOutputLength` option is supported now.
- version: v9.4.0
pr-url: https://github.com/nodejs/node/pull/16042
description: The `dictionary` option can be an `ArrayBuffer`.
@@ -514,6 +517,8 @@ ignored by the decompression classes.
* `dictionary` {Buffer|TypedArray|DataView|ArrayBuffer} (deflate/inflate only,
empty dictionary by default)
* `info` {boolean} (If `true`, returns an object with `buffer` and `engine`.)
+* `maxOutputLength` {integer} Limits output size when using
+ [convenience methods][]. **Default:** [`buffer.kMaxLength`][]
See the [`deflateInit2` and `inflateInit2`][] documentation for more
information.
@@ -521,6 +526,10 @@ information.
## Class: `BrotliOptions`
<!-- YAML
added: v11.7.0
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/33516
+ description: The `maxOutputLength` option is supported now.
-->
<!--type=misc-->
@@ -531,6 +540,8 @@ Each Brotli-based class takes an `options` object. All options are optional.
* `finishFlush` {integer} **Default:** `zlib.constants.BROTLI_OPERATION_FINISH`
* `chunkSize` {integer} **Default:** `16 * 1024`
* `params` {Object} Key-value object containing indexed [Brotli parameters][].
+* `maxOutputLength` {integer} Limits output size when using
+ [convenience methods][]. **Default:** [`buffer.kMaxLength`][]
For example:
@@ -1160,6 +1171,7 @@ Decompress a chunk of data with [`Unzip`][].
[`BrotliCompress`]: #zlib_class_zlib_brotlicompress
[`BrotliDecompress`]: #zlib_class_zlib_brotlidecompress
[`Buffer`]: buffer.html#buffer_class_buffer
+[`buffer.kMaxLength`]: buffer.html#buffer_buffer_kmaxlength
[`Content-Encoding`]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
[`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
[`DeflateRaw`]: #zlib_class_zlib_deflateraw
@@ -1177,5 +1189,6 @@ Decompress a chunk of data with [`Unzip`][].
[Memory Usage Tuning]: #zlib_memory_usage_tuning
[RFC 7932]: https://www.rfc-editor.org/rfc/rfc7932.txt
[Streams API]: stream.md
+[convenience methods]: #zlib_convenience_methods
[zlib documentation]: https://zlib.net/manual.html#Constants
[zlib.createGzip example]: #zlib_zlib