@@ -484,6 +484,9 @@ These advanced options are available for controlling decompression:
484
484
<!-- YAML
485
485
added: v0.11.1
486
486
changes:
487
+ - version: REPLACEME
488
+ pr-url: REPLACEME
489
+ description: The `maxOutputLength` option is supported now.
487
490
- version: v9.4.0
488
491
pr-url: https://github.com/nodejs/node/pull/16042
489
492
description: The `dictionary` option can be an `ArrayBuffer`.
@@ -512,13 +515,19 @@ ignored by the decompression classes.
512
515
* ` dictionary ` {Buffer|TypedArray|DataView|ArrayBuffer} (deflate/inflate only,
513
516
empty dictionary by default)
514
517
* ` info ` {boolean} (If ` true ` , returns an object with ` buffer ` and ` engine ` .)
518
+ * ` maxOutputLength ` {integer} Limits output size when using
519
+ [ convenience methods] [ ] . ** Default:** [ ` buffer.kMaxLength ` ] [ ]
515
520
516
521
See the [ ` deflateInit2 ` and ` inflateInit2 ` ] [ ] documentation for more
517
522
information.
518
523
519
524
## Class: ` BrotliOptions `
520
525
<!-- YAML
521
526
added: v11.7.0
527
+ changes:
528
+ - version: REPLACEME
529
+ pr-url: REPLACEME
530
+ description: The `maxOutputLength` option is supported now.
522
531
-->
523
532
524
533
<!-- type=misc-->
@@ -529,6 +538,8 @@ Each Brotli-based class takes an `options` object. All options are optional.
529
538
* ` finishFlush ` {integer} ** Default:** ` zlib.constants.BROTLI_OPERATION_FINISH `
530
539
* ` chunkSize ` {integer} ** Default:** ` 16 * 1024 `
531
540
* ` params ` {Object} Key-value object containing indexed [ Brotli parameters] [ ] .
541
+ * ` maxOutputLength ` {integer} Limits output size when using
542
+ [ convenience methods] [ ] . ** Default:** [ ` buffer.kMaxLength ` ] [ ]
532
543
533
544
For example:
534
545
@@ -1140,6 +1151,7 @@ Decompress a chunk of data with [`Unzip`][].
1140
1151
[ `BrotliCompress` ] : #zlib_class_zlib_brotlicompress
1141
1152
[ `BrotliDecompress` ] : #zlib_class_zlib_brotlidecompress
1142
1153
[ `Buffer` ] : buffer.html#buffer_class_buffer
1154
+ [ `buffer.kMaxLength` ] : buffer.html#buffer_buffer_kmaxlength
1143
1155
[ `Content-Encoding` ] : https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
1144
1156
[ `DataView` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
1145
1157
[ `DeflateRaw` ] : #zlib_class_zlib_deflateraw
@@ -1157,5 +1169,6 @@ Decompress a chunk of data with [`Unzip`][].
1157
1169
[ Memory Usage Tuning ] : #zlib_memory_usage_tuning
1158
1170
[ RFC 7932 ] : https://www.rfc-editor.org/rfc/rfc7932.txt
1159
1171
[ Streams API ] : stream.md
1172
+ [ convenience methods ] : #zlib_convenience_methods
1160
1173
[ zlib documentation ] : https://zlib.net/manual.html#Constants
1161
1174
[ zlib.createGzip example ] : #zlib_zlib
0 commit comments