aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKyle Robinson Young <kyle@dontkry.com>2013-03-25 12:15:10 -0700
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-29 14:53:34 +0100
commit74ef94907277d8aa29d23cef29aee25161960376 (patch)
tree1677ec6e54ce6926dcca5560c14af0fb8f80d596 /doc
parent46da8c2da6d6c9da4f5fd17e982fc4fb59862f2d (diff)
downloadandroid-node-v8-74ef94907277d8aa29d23cef29aee25161960376.tar.gz
android-node-v8-74ef94907277d8aa29d23cef29aee25161960376.tar.bz2
android-node-v8-74ef94907277d8aa29d23cef29aee25161960376.zip
zlib: allow passing options to convenience methods
Diffstat (limited to 'doc')
-rw-r--r--doc/api/zlib.markdown25
1 files changed, 11 insertions, 14 deletions
diff --git a/doc/api/zlib.markdown b/doc/api/zlib.markdown
index 6a194b9e11..3dd8d2118c 100644
--- a/doc/api/zlib.markdown
+++ b/doc/api/zlib.markdown
@@ -187,37 +187,35 @@ the header.
<!--type=misc-->
-All of these take a string or buffer as the first argument, and call the
-supplied callback with `callback(error, result)`. The
-compression/decompression engine is created using the default settings
-in all convenience methods. To supply different options, use the
-zlib classes directly.
+All of these take a string or buffer 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)`.
-## zlib.deflate(buf, callback)
+## zlib.deflate(buf, [options], callback)
Compress a string with Deflate.
-## zlib.deflateRaw(buf, callback)
+## zlib.deflateRaw(buf, [options], callback)
Compress a string with DeflateRaw.
-## zlib.gzip(buf, callback)
+## zlib.gzip(buf, [options], callback)
Compress a string with Gzip.
-## zlib.gunzip(buf, callback)
+## zlib.gunzip(buf, [options], callback)
Decompress a raw Buffer with Gunzip.
-## zlib.inflate(buf, callback)
+## zlib.inflate(buf, [options], callback)
Decompress a raw Buffer with Inflate.
-## zlib.inflateRaw(buf, callback)
+## zlib.inflateRaw(buf, [options], callback)
Decompress a raw Buffer with InflateRaw.
-## zlib.unzip(buf, callback)
+## zlib.unzip(buf, [options], callback)
Decompress a raw Buffer with Unzip.
@@ -225,8 +223,7 @@ Decompress a raw Buffer with Unzip.
<!--type=misc-->
-Each class takes an options object. All options are optional. (The
-convenience methods use the default settings for all options.)
+Each class takes an options object. All options are optional.
Note that some options are only relevant when compressing, and are
ignored by the decompression classes.