GzipHttpCompressor
Implements
Index
Constructors
constructor
Parameters
options: GzipHttpCompressorOptions = {}
Compressor options.
Returns GzipHttpCompressor
Throws - If
qualityis out of the valid range.
Properties
readonlycontentEncoding
Value sent in the Content-Encoding header, for example gzip or br.
Methods
compress
Compresses a request body.
Parameters
data: Buffer<ArrayBufferLike>
The raw bytes to compress.
Returns Promise<Buffer<ArrayBufferLike>>
The compressed bytes.
Compresses request bodies using gzip.
Built on the
node:zlibmodule, so it works wherever the client runs on Node.js.