zlib.createDeflateRaw([options])


创建并返回一个新的 DeflateRaw 对象。

【Creates and returns a new DeflateRaw object.】

将 zlib 从 1.2.8 升级到 1.2.11 后,当 windowBits 为原始 deflate 流设置为 8 时,其行为发生了变化。zlib 会在最初设置为 8 时自动将 windowBits 设置为 9。较新的 zlib 版本会抛出异常,因此 Node.js 恢复了将 8 的值升级为 9 的原始行为,因为将 windowBits = 9 传递给 zlib 实际上会生成一个有效只使用 8 位窗口的压缩流。

【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 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.】