Node.js Zlib Complete Reference
The zlib module provides compression functionality implemented using Gzip, Deflate/Inflate, and Brotli.
The Complete Reference of Zlib are listed below:
Methods |
Description |
---|---|
zlib.constants | It is used to yields an object listing Zlib-related constants. |
zlib.createBrotliCompress() | It is used to create BrotliCompress object. |
zlib.createBrotliDecompress() | It is used to create a new BrotliDecompress object. |
zlib.createUnzip() | It is used to create a new Unzip object. |
zlib.createDeflateRaw() | It is used to create a new DeflateRaw object. |
zlib.createGunzip() | It is used to create a new Gunzip object. |
zlib.createInflateRaw() | It is used to create a new InflateRaw object. |
zlib.createDeflate() | It is used to create a new Deflate object. |
zlib.createInflate() | It is used to create a new Inflate object. |
zlib.gzip() | It is used to compress a chunk of data. |
Class: zlib.ZlibBase
Methods |
Description |
---|---|
zlib.bytesWritten | It is used to specify the number of bytes written to the engine before the bytes are processed. |
zlib.close() | It is used to close the underlying handle. |
zlib.flush() | It can compel zlib to return as much output as achievable at present. |
Convenience Methods
Methods |
Description |
---|---|
zlib.brotliCompress() | It is used to compresses a chunk of data. |
zlib.brotliCompressSync() | It is used to compress a chunk of data with BrotliCompress. |
zlib.brotliDecompress() | It is used to decompresses a chunk of data with BrotliCompress. |
zlib.brotliDecompressSync() | is used to decompress a chunk of data with BrotliDecompress. |
zlib.deflate() | It is used to compress a chunk of data. |
zlib.deflateSync() | It is used to compress a chunk of data with Deflate. |
zlib.deflateRaw() | It is used to compress a chunk of data. |
zlib.deflateRawSync() | It is used to compress a chunk of data with DeflateRaw. |
zlib.gunzip() | It is used to decompress a chunk of data. |
zlib.gunzipSync() | It is used to decompress a chunk of data with Gunzip. |
zlib.createGzip() | It is used to create a new Gzip object. |
zlib.gzipSync() | It is used to compress a chunk of data with Gzip. |
zlib.inflate() | It is used to decompress a chunk of data. |
zlib.inflateSync() | It is used to decompress a chunk of data with Inflate. |
zlib.inflateRaw() | It is used to decompress a chunk of data. |
zlib.inflateRawSync() | It is used to decompress a chunk of data with InflateRaw. |
zlib.unzip() | It is used to decompress a chunk of data. |
zlib.unzipSync() | It is used to decompress a chunk of data with Unzip. |
Contact Us