diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-10-26 12:32:23 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-10-29 20:14:16 +0100 |
commit | 25ef9d2db627ef75d1f5562481c5b4357678d092 (patch) | |
tree | 5b3b2d45c70e45b2ff4addcbb48b7fb195d53d30 /doc/api/zlib.md | |
parent | 241eb6122ee6f36de16ee4ed4a6a291510b1807f (diff) | |
download | android-node-v8-25ef9d2db627ef75d1f5562481c5b4357678d092.tar.gz android-node-v8-25ef9d2db627ef75d1f5562481c5b4357678d092.tar.bz2 android-node-v8-25ef9d2db627ef75d1f5562481c5b4357678d092.zip |
doc: more accurate zlib windowBits information
Fixes: https://github.com/nodejs/node/issues/14847
PR-URL: https://github.com/nodejs/node/pull/16511
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r-- | doc/api/zlib.md | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 96e6a0c87d..9fa9820f34 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -459,12 +459,11 @@ added: v0.5.8 Creates and returns a new [DeflateRaw][] object with the given [options][]. *Note*: An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when windowBits -is set to 8 for raw deflate streams. zlib does not have a working implementation -of an 8-bit Window for raw deflate streams and would automatically set windowBit -to 9 if initially set to 8. Newer versions of zlib will throw an exception. -This creates a potential DOS vector, and as such the behavior ahs been reverted -in Node.js 8, 6, and 4. Node.js version 9 and higher will throw when windowBits -is set to 8. +is set to 8 for raw deflate streams. zlib would automatically set windowBits +to 9 if was initially set to 8. Newer versions of zlib will throw an exception, +so Node.js restored the original behavior of upgrading a value of 8 to 9, +since passing `windowBits = 9` to zlib actually results in a compressed stream +that effectively uses an 8-bit window only. ## zlib.createGunzip([options]) <!-- YAML |