diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-02 08:38:48 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-04 13:45:39 +0300 |
commit | de0053cc3280bdf72c9010f383290f79120a1e98 (patch) | |
tree | 493fc9bd84c3d8e97342202d0a840b4fe29bdd6e /doc/api/zlib.md | |
parent | 237cbe10fb82ba6ec69b14193a4a970e184306e7 (diff) | |
download | android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.gz android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.tar.bz2 android-node-v8-de0053cc3280bdf72c9010f383290f79120a1e98.zip |
doc: fix various nits
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md.
* Space infix operators.
* Unify quotes in inline code spans (use only single quotes).
* Unify `* Returns:` (eliminate deviations).
* Dedupe spaces.
PR-URL: https://github.com/nodejs/node/pull/19743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/zlib.md')
-rw-r--r-- | doc/api/zlib.md | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/api/zlib.md b/doc/api/zlib.md index cf9cb34a35..4a9103a979 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -165,7 +165,7 @@ The memory requirements for deflate are (in bytes): (1 << (windowBits + 2)) + (1 << (memLevel + 9)) ``` -That is: 128K for windowBits=15 + 128K for memLevel = 8 +That is: 128K for windowBits = 15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, to reduce the default memory requirements from 256K to 128K, the @@ -178,20 +178,20 @@ const options = { windowBits: 14, memLevel: 7 }; This will, however, generally degrade compression. The memory requirements for inflate are (in bytes) `1 << windowBits`. -That is, 32K for windowBits=15 (default value) plus a few kilobytes +That is, 32K for windowBits = 15 (default value) plus a few kilobytes for small objects. This is in addition to a single internal output slab buffer of size `chunkSize`, which defaults to 16K. The speed of `zlib` compression is affected most dramatically by the -`level` setting. A higher level will result in better compression, but -will take longer to complete. A lower level will result in less +`level` setting. A higher level will result in better compression, but +will take longer to complete. A lower level will result in less compression, but will be much faster. In general, greater memory usage options will mean that Node.js has to make fewer calls to `zlib` because it will be able to process more data on -each `write` operation. So, this is another factor that affects the +each `write` operation. So, this is another factor that affects the speed, at the cost of memory usage. ## Flushing @@ -233,9 +233,9 @@ added: v0.5.8 All of the constants defined in `zlib.h` are also defined on `require('zlib').constants`. In the normal course of operations, it will not be -necessary to use these constants. They are documented so that their presence is +necessary to use these constants. They are documented so that their presence is not surprising. This section is taken almost directly from the -[zlib documentation][]. See <https://zlib.net/manual.html#Constants> for more +[zlib documentation][]. See <https://zlib.net/manual.html#Constants> for more details. Previously, the constants were available directly from `require('zlib')`, for @@ -298,7 +298,7 @@ changes: <!--type=misc--> -Each class takes an `options` object. All options are optional. +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. |