diff --git a/lib/core/util.js b/lib/core/util.js index fac3a8a9a37..0ef17a50fe0 100644 --- a/lib/core/util.js +++ b/lib/core/util.js @@ -977,14 +977,6 @@ class InflateStream extends stream.Transform { } } -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - /** * Return the list of transform streams necessary * to decode a body stream of the given content encoding. @@ -1011,7 +1003,7 @@ function getDecoders (contentEncoding) { }) ) } else if (coding === 'deflate') { - decoders.push(createInflate({ + decoders.push(new InflateStream({ flush: zlib.constants.Z_SYNC_FLUSH, finishFlush: zlib.constants.Z_SYNC_FLUSH }))