diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 537b39efe268e3..55dc6ebb348108 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -186,6 +186,9 @@ http.createServer((request, response) => { ``` ## Constants + @@ -252,6 +255,9 @@ For initializing zalloc, zfree, opaque. * `zlib.Z_NULL` ## Class Options + @@ -272,40 +278,67 @@ See the description of `deflateInit2` and `inflateInit2` at for more information on these. ## Class: zlib.Deflate + Compress data using deflate. ## Class: zlib.DeflateRaw + Compress data using deflate, and do not append a zlib header. ## Class: zlib.Gunzip + Decompress a gzip stream. ## Class: zlib.Gzip + Compress data using gzip. ## Class: zlib.Inflate + Decompress a deflate stream. ## Class: zlib.InflateRaw + Decompress a raw deflate stream. ## Class: zlib.Unzip + Decompress either a Gzip- or Deflate-compressed stream by auto-detecting the header. ## Class: zlib.Zlib + Not exported by the `zlib` module. It is documented here because it is the base class of the compressor/decompressor classes. ### zlib.flush([kind], callback) + `kind` defaults to `zlib.Z_FULL_FLUSH`. @@ -318,40 +351,67 @@ normal call to `.write()`, i.e. it will be queued up behind other pending writes and will only produce output when data is being read from the stream. ### zlib.params(level, strategy, callback) + Dynamically update the compression level and compression strategy. Only applicable to deflate algorithm. ### zlib.reset() + Reset the compressor/decompressor to factory defaults. Only applicable to the inflate and deflate algorithms. ## zlib.createDeflate([options]) + Returns a new [Deflate][] object with an [options][]. ## zlib.createDeflateRaw([options]) + Returns a new [DeflateRaw][] object with an [options][]. ## zlib.createGunzip([options]) + Returns a new [Gunzip][] object with an [options][]. ## zlib.createGzip([options]) + Returns a new [Gzip][] object with an [options][]. ## zlib.createInflate([options]) + Returns a new [Inflate][] object with an [options][]. ## zlib.createInflateRaw([options]) + Returns a new [InflateRaw][] object with an [options][]. ## zlib.createUnzip([options]) + Returns a new [Unzip][] object with an [options][]. @@ -367,37 +427,79 @@ Every method has a `*Sync` counterpart, which accept the same arguments, but without a callback. ### zlib.deflate(buf[, options], callback) + ### zlib.deflateSync(buf[, options]) + Compress a Buffer or string with Deflate. ### zlib.deflateRaw(buf[, options], callback) + ### zlib.deflateRawSync(buf[, options]) + Compress a Buffer or string with DeflateRaw. ### zlib.gunzip(buf[, options], callback) + ### zlib.gunzipSync(buf[, options]) + Decompress a Buffer or string with Gunzip. ### zlib.gzip(buf[, options], callback) + ### zlib.gzipSync(buf[, options]) + Compress a Buffer or string with Gzip. ### zlib.inflate(buf[, options], callback) + ### zlib.inflateSync(buf[, options]) + Decompress a Buffer or string with Inflate. ### zlib.inflateRaw(buf[, options], callback) + ### zlib.inflateRawSync(buf[, options]) + Decompress a Buffer or string with InflateRaw. ### zlib.unzip(buf[, options], callback) + ### zlib.unzipSync(buf[, options]) + Decompress a Buffer or string with Unzip.