Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarity type of first argument in zlib #5685

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions doc/api/zlib.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -324,53 +324,47 @@ Returns a new [Unzip][] object with an [options][].

<!--type=misc-->

All of these take a string or buffer as the first argument, an optional second
All of these take a [Buffer][] or string as the first argument, an optional second
argument to supply options to the zlib classes and will call the supplied
callback with `callback(error, result)`.

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 string with Deflate.
Compress a Buffer or string with Deflate.

### zlib.deflateRaw(buf[, options], callback)
### zlib.deflateRawSync(buf[, options])

Compress a string with DeflateRaw.

### zlib.deflateSync(buf[, options])

Compress a string with Deflate.
Compress a Buffer or string with DeflateRaw.

### zlib.gunzip(buf[, options], callback)
### zlib.gunzipSync(buf[, options])

Decompress a raw Buffer with Gunzip.
Decompress a Buffer or string with Gunzip.

### zlib.gzip(buf[, options], callback)
### zlib.gzipSync(buf[, options])

Compress a string with Gzip.
Compress a Buffer or string with Gzip.

### zlib.inflate(buf[, options], callback)
### zlib.inflateSync(buf[, options])

Decompress a raw Buffer with Inflate.
Decompress a Buffer or string with Inflate.

### zlib.inflateRaw(buf[, options], callback)
### zlib.inflateRawSync(buf[, options])

Decompress a raw Buffer with InflateRaw.

### zlib.inflateSync(buf[, options])

Decompress a raw Buffer with Inflate.
Decompress a Buffer or string with InflateRaw.

### zlib.unzip(buf[, options], callback)
### zlib.unzipSync(buf[, options])

Decompress a raw Buffer with Unzip.
Decompress a Buffer or string with Unzip.

[accept-encoding]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3
[content-encoding]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
Expand All @@ -384,3 +378,4 @@ Decompress a raw Buffer with Unzip.
[Inflate]: #zlib_class_zlib_inflate
[InflateRaw]: #zlib_class_zlib_inflateraw
[Unzip]: #zlib_class_zlib_unzip
[Buffer]: buffer.html