This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and is a readable/writable Stream.
Static variables
staticread onlyZ_DEFLATED:Int
The deflate compression method (the only one supported in this version).
Static methods
staticcreateDeflateRaw(?options:ZlibOptions):DeflateRaw
Returns a new DeflateRaw object with an options.
staticcreateInflateRaw(?options:ZlibOptions):InflateRaw
Returns a new InflateRaw object with an options.
staticdeflate(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticdeflate(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with Deflate.
staticdeflateRaw(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticdeflateRaw(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with DeflateRaw.
staticdeflateRawSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Compress a string with DeflateRaw (synchronous version).
staticdeflateSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Compress a string with Deflate (synchronous version).
staticgunzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticgunzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Gunzip.
staticgunzipSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Decompress a raw Buffer with Gunzip (synchronous version).
staticgzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticgzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with Gzip.
staticgzipSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Compress a string with Gzip (synchronous version).
staticinflate(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticinflate(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Inflate.
staticinflateRaw(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticinflateRaw(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with InflateRaw.
staticinflateRawSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Decompress a raw Buffer with InflateRaw (synchronous version).
staticinflateSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Decompress a raw Buffer with Inflate (synchronous version).
staticunzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticunzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Unzip.
staticunzipSync(buf:EitherType<String, Buffer>, ?options:ZlibOptions):Buffer
Decompress a raw Buffer with Unzip (synchronous version).