{
  "source": "zlib.markdown",
  "modules": [
    {
      "textRaw": "Zlib",
      "name": "zlib",
      "desc": "<pre><code>稳定度: 3 - 稳定</code></pre>\n<p>You can access this module with:\n\n</p>\n<p>你可以这样引入此模块：\n\n</p>\n<pre><code>var zlib = require(&apos;zlib&apos;);</code></pre>\n<p>This provides bindings to Gzip/Gunzip, Deflate/Inflate, and\nDeflateRaw/InflateRaw classes.  Each class takes the same options, and\nis a readable/writable Stream.\n\n</p>\n<p>这个模块提供了对Gzip/Gunzip, Deflate/Inflate和DeflateRaw/InflateRaw类的绑定。每一个类都可以接收相同的选项，并且本身也是一个可读写的Stream类。\n\n</p>\n",
      "modules": [
        {
          "textRaw": "例子",
          "name": "例子",
          "desc": "<p>Compressing or decompressing a file can be done by piping an\nfs.ReadStream into a zlib stream, then into an fs.WriteStream.\n\n</p>\n<p>压缩或解压缩一个文件可以通过导流一个 fs.ReadStream 到一个 zlib 流，然后到一个 fs.WriteStream 来完成。\n\n</p>\n<pre><code>inp.pipe(gzip).pipe(out);</code></pre>\n<p>Compressing or decompressing data in one step can be done by using\nthe convenience methods.\n\n</p>\n<p>一步压缩或解压缩数据可以通过快捷方法来完成。\n\n</p>\n<pre><code>var buffer = new Buffer(&apos;eJzT0yMAAGTvBe8=&apos;, &apos;base64&apos;);\nzlib.unzip(buffer, function(err, buffer) {\n  if (!err) {\n    console.log(buffer.toString());\n  }\n});</code></pre>\n<p>To use this module in an HTTP client or server, use the\n<a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3\">accept-encoding</a>\non requests, and the\n<a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11\">content-encoding</a>\nheader on responses.\n\n</p>\n<p>要在 HTTP 客户端或服务器中使用此模块，请在请求和响应中使用 <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3\">accept-encoding</a> 和 <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11\">content-encoding</a> 头。\n\n</p>\n<p><strong>Note: these examples are drastically simplified to show\nthe basic concept.</strong>  Zlib encoding can be expensive, and the results\nought to be cached.  See <a href=\"#zlib_memory_usage_tuning\">Memory Usage Tuning</a>\nbelow for more information on the speed/memory/compression\ntradeoffs involved in zlib usage.\n\n</p>\n<p><strong>注意：这些例子只是极其简单地展示了基础的概念</strong> \nZlib 编码消耗非常大,结果需要缓存.看下面的<a href=\"#zlib_memory_usage_tuning\">内存调优</a>\n中更多的关于Zlib用法中 速度/内存/压缩 的权衡取舍。\n\n</p>\n<pre><code>  // 注意: 这不是一个不合格的 accept-encoding 解析器\n  // 详见 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3\n  if (acceptEncoding.match(/\\bdeflate\\b/)) {\n    response.writeHead(200, { &apos;content-encoding&apos;: &apos;deflate&apos; });\n    raw.pipe(zlib.createDeflate()).pipe(response);\n  } else if (acceptEncoding.match(/\\bgzip\\b/)) {\n    response.writeHead(200, { &apos;content-encoding&apos;: &apos;gzip&apos; });\n    raw.pipe(zlib.createGzip()).pipe(response);\n  } else {\n    response.writeHead(200, {});\n    raw.pipe(response);\n  }\n}).listen(1337);</code></pre>\n",
          "type": "module",
          "displayName": "例子"
        }
      ],
      "methods": [
        {
          "textRaw": "zlib.createGzip([options])",
          "type": "method",
          "name": "createGzip",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_gzip\">Gzip</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_gzip\">Gzip</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createGunzip([options])",
          "type": "method",
          "name": "createGunzip",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_gunzip\">Gunzip</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_gunzip\">Gunzip</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createDeflate([options])",
          "type": "method",
          "name": "createDeflate",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_deflate\">Deflate</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_deflate\">Deflate</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createInflate([options])",
          "type": "method",
          "name": "createInflate",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_inflate\">Inflate</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_inflate\">Inflate</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createDeflateRaw([options])",
          "type": "method",
          "name": "createDeflateRaw",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_deflateraw\">DeflateRaw</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_deflateraw\">DeflateRaw</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createInflateRaw([options])",
          "type": "method",
          "name": "createInflateRaw",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_inflateraw\">InflateRaw</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_inflateraw\">InflateRaw</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.createUnzip([options])",
          "type": "method",
          "name": "createUnzip",
          "desc": "<p>Returns a new <a href=\"#zlib_class_zlib_unzip\">Unzip</a> object with an\n<a href=\"#zlib_options\">options</a>.\n\n</p>\n<p>以 <a href=\"#zlib_options\">options</a> 所给选项返回一个新的 <a href=\"#zlib_class_zlib_unzip\">Unzip</a> 对象。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.deflate(buf, [options], callback)",
          "type": "method",
          "name": "deflate",
          "desc": "<p>Compress a string with Deflate.\n\n</p>\n<p>使用 Deflate 压缩一个字符串。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.deflateRaw(buf, [options], callback)",
          "type": "method",
          "name": "deflateRaw",
          "desc": "<p>Compress a string with DeflateRaw.\n\n</p>\n<p>使用 DeflateRaw 压缩一个字符串。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.Gzip(buf, [options], callback)",
          "type": "method",
          "name": "Gzip",
          "desc": "<p>Compress a string with Gzip.\n\n</p>\n<p>使用 Gzip 压缩一个字符串。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.gunzip(buf, [options], callback)",
          "type": "method",
          "name": "gunzip",
          "desc": "<p>Decompress a raw Buffer with Gunzip.\n\n</p>\n<p>使用 Gunzip 解压缩一个原始的 Buffer。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.inflate(buf, [options], callback)",
          "type": "method",
          "name": "inflate",
          "desc": "<p>Decompress a raw Buffer with Inflate.\n\n</p>\n<p>使用 Inflate 解压缩一个原始的 Buffer。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.inflateRaw(buf, [options], callback)",
          "type": "method",
          "name": "inflateRaw",
          "desc": "<p>Decompress a raw Buffer with InflateRaw.\n\n</p>\n<p>使用 InflateRaw 解压缩一个原始的 Buffer。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "zlib.unzip(buf, [options], callback)",
          "type": "method",
          "name": "unzip",
          "desc": "<p>Decompress a raw Buffer with Unzip.\n\n</p>\n<p>使用 Unzip 解压缩一个原始的 Buffer。\n\n</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "buf"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ]
        }
      ],
      "properties": [
        {
          "textRaw": "类: zlib.Zlib",
          "name": "Zlib",
          "desc": "<p>Not exported by the <code>zlib</code> module. It is documented here because it is the base\nclass of the compressor/decompressor classes.\n\n</p>\n<p>这个类未被 <code>zlib</code> 模块导出，编入此文档是因为它是其它压缩器/解压缩器的基类。\n\n</p>\n",
          "methods": [
            {
              "textRaw": "zlib.flush([kind], callback)",
              "type": "method",
              "name": "flush",
              "desc": "<p><code>kind</code> defaults to <code>zlib.Z_FULL_FLUSH</code>.\n\n</p>\n<p><code>kind</code> 缺省为 <code>zlib.Z_FULL_FLUSH</code>。\n\n</p>\n<p>Flush pending data. Don&apos;t call this frivolously, premature flushes negatively\nimpact the effectiveness of the compression algorithm.\n\n</p>\n<p>写入缓冲数据。请勿轻易调用此方法，过早的写入会对压缩算法的作用产生影响。\n\n</p>\n",
              "signatures": [
                {
                  "params": [
                    {
                      "name": "kind",
                      "optional": true
                    },
                    {
                      "name": "callback"
                    }
                  ]
                }
              ]
            },
            {
              "textRaw": "zlib.params(level, strategy, callback)",
              "type": "method",
              "name": "params",
              "desc": "<p>Dynamically update the compression level and compression strategy.\nOnly applicable to deflate algorithm.\n\n</p>\n<p>动态更新压缩级别和压缩策略。仅对 deflate 算法有效。\n\n</p>\n",
              "signatures": [
                {
                  "params": [
                    {
                      "name": "level"
                    },
                    {
                      "name": "strategy"
                    },
                    {
                      "name": "callback"
                    }
                  ]
                }
              ]
            },
            {
              "textRaw": "zlib.reset()",
              "type": "method",
              "name": "reset",
              "desc": "<p>Reset the compressor/decompressor to factory defaults. Only applicable to\nthe inflate and deflate algorithms.\n\n</p>\n<p>将压缩器/解压缩器重置为缺省值。仅对 inflate 和 deflate 算法有效。\n\n</p>\n",
              "signatures": [
                {
                  "params": []
                }
              ]
            }
          ]
        },
        {
          "textRaw": "类: zlib.Gzip",
          "name": "Gzip",
          "desc": "<p>Compress data using gzip.\n\n</p>\n<p>使用 gzip 压缩数据。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.Gunzip",
          "name": "Gunzip",
          "desc": "<p>Decompress a gzip stream.\n\n</p>\n<p>解压缩一个 gzip 流。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.Deflate",
          "name": "Deflate",
          "desc": "<p>Compress data using deflate.\n\n</p>\n<p>使用 deflate 压缩数据。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.Inflate",
          "name": "Inflate",
          "desc": "<p>Decompress a deflate stream.\n\n</p>\n<p>解压缩一个 deflate 流。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.DeflateRaw",
          "name": "DeflateRaw",
          "desc": "<p>Compress data using deflate, and do not append a zlib header.\n\n</p>\n<p>使用 deflate 压缩数据，并且不附带 zlib 头。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.InflateRaw",
          "name": "InflateRaw",
          "desc": "<p>Decompress a raw deflate stream.\n\n</p>\n<p>解压缩一个原始 deflate 流。\n\n</p>\n"
        },
        {
          "textRaw": "类: zlib.Unzip",
          "name": "Unzip",
          "desc": "<p>Decompress either a Gzip- or Deflate-compressed stream by auto-detecting\nthe header.\n\n</p>\n<p>自动识别头部来解压缩一个以 gzip 或 deflate 压缩的流。\n\n</p>\n"
        }
      ],
      "miscs": [
        {
          "textRaw": "快捷方法",
          "name": "快捷方法",
          "type": "misc",
          "desc": "<p>All of these take a string or buffer as the first argument, an optional second\nargument to supply options to the zlib classes and will call the supplied\ncallback with <code>callback(error, result)</code>.\n\n</p>\n<p>所有这些方法的第一个参数都可以是字符串或 Buffer；可选地可以将传给 zlib 类的选项作为第二个参数传入；回调格式为 <code>callback(error, result)</code>。\n\n</p>\n"
        },
        {
          "textRaw": "选项",
          "name": "选项",
          "type": "misc",
          "desc": "<p>Each class takes an options object.  All options are optional.\n\n</p>\n<p>各个类都有一个选项对象。所有选项都是可选的。\n\n</p>\n<p>Note that some options are only relevant when compressing, and are\nignored by the decompression classes.\n\n</p>\n<p>请注意有些选项仅对压缩有效，并会被解压缩类所忽略。\n\n</p>\n<ul>\n<li>flush (default: <code>zlib.Z_NO_FLUSH</code>)</li>\n<li>chunkSize (default: 16*1024)</li>\n<li>windowBits</li>\n<li>level (compression only)</li>\n<li>memLevel (compression only)</li>\n<li>strategy (compression only)</li>\n<li><p>dictionary (deflate/inflate only, empty dictionary by default)</p>\n</li>\n<li><p>flush（缺省：<code>zlib.Z_NO_FLUSH</code>）</p>\n</li>\n<li>chunkSize（缺省：16*1024）</li>\n<li>windowBits</li>\n<li>level（仅用于压缩）</li>\n<li>memLevel（仅用于压缩）</li>\n<li>strategy（仅用于压缩）</li>\n<li>dictionary（仅用于 deflate/inflate，缺省为空目录）</li>\n</ul>\n<p>See the description of <code>deflateInit2</code> and <code>inflateInit2</code> at\n</p>\n<p><a href=\"http://zlib.net/manual.html#Advanced\">http://zlib.net/manual.html#Advanced</a> for more information on these.\n\n</p>\n<p>详情请参阅 <a href=\"http://zlib.net/manual.html#Advanced\">http://zlib.net/manual.html#Advanced</a> 的 <code>deflateInit2</code> 和 <code>inflateInit2</code>。\n\n</p>\n"
        },
        {
          "textRaw": "内存使用调优",
          "name": "内存使用调优",
          "type": "misc",
          "desc": "<p>From <code>zlib/zconf.h</code>, modified to node&apos;s usage:\n\n</p>\n<p>来自 <code>zlib/zconf.h</code>，修改为 node 的用法：\n\n</p>\n<p>The memory requirements for deflate are (in bytes):\n\n</p>\n<p>deflate 的内存需求（按字节）：\n\n</p>\n<pre><code>(1 &lt;&lt; (windowBits+2)) +  (1 &lt;&lt; (memLevel+9))</code></pre>\n<p>that is: 128K for windowBits=15  +  128K for memLevel = 8\n(default values) plus a few kilobytes for small objects.\n\n</p>\n<p>表示：windowBits = 15 的 128K + memLevel = 8 的 128K（缺省值）加上其它对象的若干 KB。\n\n</p>\n<p>For example, if you want to reduce\nthe default memory requirements from 256K to 128K, set the options to:\n\n</p>\n<p>举个例子，如果您需要将缺省内存需求从 256K 减少到 128K，设置选项：\n\n</p>\n<pre><code>{ windowBits: 14, memLevel: 7 }</code></pre>\n<p>Of course this will generally degrade compression (there&apos;s no free lunch).\n\n</p>\n<p>当然这通常会降低压缩等级（天底下没有免费午餐）。\n\n</p>\n<p>The memory requirements for inflate are (in bytes)\n\n</p>\n<p>inflate 的内存需求（按字节）：\n\n</p>\n<pre><code>1 &lt;&lt; windowBits</code></pre>\n<p>that is, 32K for windowBits=15 (default value) plus a few kilobytes\nfor small objects.\n\n</p>\n<p>表示 windowBits = 15（缺省值）的 32K 加上其它对象的若干 KB。\n\n</p>\n<p>This is in addition to a single internal output slab buffer of size\n<code>chunkSize</code>, which defaults to 16K.\n\n</p>\n<p>这是除了内部输出缓冲外 <code>chunkSize</code> 的大小，缺省为 16K。\n\n</p>\n<p>The speed of zlib compression is affected most dramatically by the\n<code>level</code> setting.  A higher level will result in better compression, but\nwill take longer to complete.  A lower level will result in less\ncompression, but will be much faster.\n\n</p>\n<p>zlib 压缩的速度主要受压缩级别 <code>level</code> 的影响。更高的压缩级别会有更好的压缩率，但也要花费更长时间。更低的压缩级别会有较低压缩率，但速度更快。\n\n</p>\n<p>In general, greater memory usage options will mean that node has to make\nfewer calls to zlib, since it&apos;ll be able to process more data in a\nsingle <code>write</code> operation.  So, this is another factor that affects the\nspeed, at the cost of memory usage.\n\n</p>\n<p>通常，使用更多内存的选项意味着 node 能减少对 zlib 的调用，因为单次 <code>write</code>操作能处理更多数据。因此，这是另一个影响速度和内存占用的因素。\n\n</p>\n"
        },
        {
          "textRaw": "常量",
          "name": "常量",
          "type": "misc",
          "desc": "<p>All of the constants defined in zlib.h are also defined on\n<code>require(&apos;zlib&apos;)</code>.\nIn the normal course of operations, you will not need to ever set any of\nthese.  They are documented here so that their presence is not\nsurprising.  This section is taken almost directly from the <a href=\"http://zlib.net/manual.html#Constants\">zlib\ndocumentation</a>.  See\n</p>\n<p><a href=\"http://zlib.net/manual.html#Constants\">http://zlib.net/manual.html#Constants</a> for more details.\n\n</p>\n<p>所有在 zlib.h 中定义的常量同样也定义在 <code>require(&apos;zlib&apos;)</code> 中。\n在通常情况下您几乎不会用到它们，编入文档只是为了让您不会对它们的存在感到惊讶。该章节几乎完全来自 <a href=\"http://zlib.net/manual.html#Constants\">zlib 的文档</a>。详见 <a href=\"http://zlib.net/manual.html#Constants\">http://zlib.net/manual.html#Constants</a>。\n\n</p>\n<p>Allowed flush values.\n\n</p>\n<p>允许的 flush 取值。\n\n</p>\n<ul>\n<li><code>zlib.Z_NO_FLUSH</code></li>\n<li><code>zlib.Z_PARTIAL_FLUSH</code></li>\n<li><code>zlib.Z_SYNC_FLUSH</code></li>\n<li><code>zlib.Z_FULL_FLUSH</code></li>\n<li><code>zlib.Z_FINISH</code></li>\n<li><code>zlib.Z_BLOCK</code></li>\n<li><p><code>zlib.Z_TREES</code></p>\n</li>\n<li><p><code>zlib.Z_NO_FLUSH</code></p>\n</li>\n<li><code>zlib.Z_PARTIAL_FLUSH</code></li>\n<li><code>zlib.Z_SYNC_FLUSH</code></li>\n<li><code>zlib.Z_FULL_FLUSH</code></li>\n<li><code>zlib.Z_FINISH</code></li>\n<li><code>zlib.Z_BLOCK</code></li>\n<li><code>zlib.Z_TREES</code></li>\n</ul>\n<p>Return codes for the compression/decompression functions. Negative\nvalues are errors, positive values are used for special but normal\nevents.\n\n</p>\n<p>压缩/解压缩函数的返回值。负数代表错误，正数代表特殊但正常的事件。\n\n</p>\n<ul>\n<li><code>zlib.Z_OK</code></li>\n<li><code>zlib.Z_STREAM_END</code></li>\n<li><code>zlib.Z_NEED_DICT</code></li>\n<li><code>zlib.Z_ERRNO</code></li>\n<li><code>zlib.Z_STREAM_ERROR</code></li>\n<li><code>zlib.Z_DATA_ERROR</code></li>\n<li><code>zlib.Z_MEM_ERROR</code></li>\n<li><code>zlib.Z_BUF_ERROR</code></li>\n<li><p><code>zlib.Z_VERSION_ERROR</code></p>\n</li>\n<li><p><code>zlib.Z_OK</code></p>\n</li>\n<li><code>zlib.Z_STREAM_END</code></li>\n<li><code>zlib.Z_NEED_DICT</code></li>\n<li><code>zlib.Z_ERRNO</code></li>\n<li><code>zlib.Z_STREAM_ERROR</code></li>\n<li><code>zlib.Z_DATA_ERROR</code></li>\n<li><code>zlib.Z_MEM_ERROR</code></li>\n<li><code>zlib.Z_BUF_ERROR</code></li>\n<li><code>zlib.Z_VERSION_ERROR</code></li>\n</ul>\n<p>Compression levels.\n\n</p>\n<p>压缩级别。\n\n</p>\n<ul>\n<li><code>zlib.Z_NO_COMPRESSION</code></li>\n<li><code>zlib.Z_BEST_SPEED</code></li>\n<li><code>zlib.Z_BEST_COMPRESSION</code></li>\n<li><p><code>zlib.Z_DEFAULT_COMPRESSION</code></p>\n</li>\n<li><p><code>zlib.Z_NO_COMPRESSION</code></p>\n</li>\n<li><code>zlib.Z_BEST_SPEED</code></li>\n<li><code>zlib.Z_BEST_COMPRESSION</code></li>\n<li><code>zlib.Z_DEFAULT_COMPRESSION</code></li>\n</ul>\n<p>Compression strategy.\n\n</p>\n<p>压缩策略。\n\n</p>\n<ul>\n<li><code>zlib.Z_FILTERED</code></li>\n<li><code>zlib.Z_HUFFMAN_ONLY</code></li>\n<li><code>zlib.Z_RLE</code></li>\n<li><code>zlib.Z_FIXED</code></li>\n<li><p><code>zlib.Z_DEFAULT_STRATEGY</code></p>\n</li>\n<li><p><code>zlib.Z_FILTERED</code></p>\n</li>\n<li><code>zlib.Z_HUFFMAN_ONLY</code></li>\n<li><code>zlib.Z_RLE</code></li>\n<li><code>zlib.Z_FIXED</code></li>\n<li><code>zlib.Z_DEFAULT_STRATEGY</code></li>\n</ul>\n<p>Possible values of the data_type field.\n\n</p>\n<p>data_type 字段的可能值。\n\n</p>\n<ul>\n<li><code>zlib.Z_BINARY</code></li>\n<li><code>zlib.Z_TEXT</code></li>\n<li><code>zlib.Z_ASCII</code></li>\n<li><p><code>zlib.Z_UNKNOWN</code></p>\n</li>\n<li><p><code>zlib.Z_BINARY</code></p>\n</li>\n<li><code>zlib.Z_TEXT</code></li>\n<li><code>zlib.Z_ASCII</code></li>\n<li><code>zlib.Z_UNKNOWN</code></li>\n</ul>\n<p>The deflate compression method (the only one supported in this version).\n\n</p>\n<p>deflate 压缩方法（该版本仅支持一种）。\n\n</p>\n<ul>\n<li><p><code>zlib.Z_DEFLATED</code></p>\n</li>\n<li><p><code>zlib.Z_DEFLATED</code></p>\n</li>\n</ul>\n<p>For initializing zalloc, zfree, opaque.\n\n</p>\n<p>初始化 zalloc/zfree/opaque。\n\n</p>\n<ul>\n<li><code>zlib.Z_NULL</code></li>\n</ul>\n<ul>\n<li><code>zlib.Z_NULL</code></li>\n</ul>\n"
        }
      ],
      "type": "module",
      "displayName": "Zlib"
    }
  ]
}