github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_deflate.html.en (about)

     1  <?xml version="1.0" encoding="ISO-8859-1"?>
     2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     3  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
     4  <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
     5  <!--
     6          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     7                This file is generated from xml source: DO NOT EDIT
     8          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     9        -->
    10  <title>mod_deflate - Apache HTTP Server Version 2.2</title>
    11  <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
    12  <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
    13  <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
    14  <script src="../style/scripts/prettify.min.js" type="text/javascript">
    15  </script>
    16  
    17  <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_deflate.html" rel="canonical" /></head>
    18  <body>
    19  <div id="page-header">
    20  <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
    21  <p class="apache">Apache HTTP Server Version 2.2</p>
    22  <img alt="" src="../images/feather.gif" /></div>
    23  <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
    24  <div id="path">
    25  <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.2</a> &gt; <a href="./">Modules</a></div>
    26  <div id="page-content">
    27  <div class="retired"><h4>Please note</h4>
    28              <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p>
    29          <p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_deflate.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache Module mod_deflate</h1>
    30  <div class="toplang">
    31  <p><span>Available Languages: </span><a href="../en/mod/mod_deflate.html" title="English">&nbsp;en&nbsp;</a> |
    32  <a href="../ja/mod/mod_deflate.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
    33  <a href="../ko/mod/mod_deflate.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
    34  </div>
    35  <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Compress content before it is delivered to the
    36  client</td></tr>
    37  <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
    38  <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>deflate_module</td></tr>
    39  <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_deflate.c</td></tr></table>
    40  <h3>Summary</h3>
    41  
    42      <p>The <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code> module provides
    43      the <code>DEFLATE</code> output filter that allows output from
    44      your server to be compressed before being sent to the client over
    45      the network.</p>
    46  </div>
    47  <div id="quickview"><h3>Topics</h3>
    48  <ul id="topics">
    49  <li><img alt="" src="../images/down.gif" /> <a href="#recommended">Sample Configurations</a></li>
    50  <li><img alt="" src="../images/down.gif" /> <a href="#enable">Enabling Compression</a></li>
    51  <li><img alt="" src="../images/down.gif" /> <a href="#proxies">Dealing with proxy servers</a></li>
    52  </ul><h3 class="directives">Directives</h3>
    53  <ul id="toc">
    54  <li><img alt="" src="../images/down.gif" /> <a href="#deflatebuffersize">DeflateBufferSize</a></li>
    55  <li><img alt="" src="../images/down.gif" /> <a href="#deflatecompressionlevel">DeflateCompressionLevel</a></li>
    56  <li><img alt="" src="../images/down.gif" /> <a href="#deflatefilternote">DeflateFilterNote</a></li>
    57  <li><img alt="" src="../images/down.gif" /> <a href="#deflateinflatelimitrequestbody">DeflateInflateLimitRequestBody</a></li>
    58  <li><img alt="" src="../images/down.gif" /> <a href="#deflateinflateratioburst">DeflateInflateRatioBurst</a></li>
    59  <li><img alt="" src="../images/down.gif" /> <a href="#deflateinflateratiolimit">DeflateInflateRatioLimit</a></li>
    60  <li><img alt="" src="../images/down.gif" /> <a href="#deflatememlevel">DeflateMemLevel</a></li>
    61  <li><img alt="" src="../images/down.gif" /> <a href="#deflatewindowsize">DeflateWindowSize</a></li>
    62  </ul>
    63  <h3>See also</h3>
    64  <ul class="seealso">
    65  <li><a href="../filter.html">Filters</a></li>
    66  </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
    67  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    68  <div class="section">
    69  <h2><a name="recommended" id="recommended">Sample Configurations</a></h2>
    70      <div class="warning"><h3>Compression and TLS</h3>
    71          <p>Some web applications are vulnerable to an information disclosure
    72          attack when a TLS connection carries deflate compressed data. For more
    73          information, review the details of the "BREACH" family of attacks.</p>
    74      </div>
    75      <p>This is a simple configuration that compresses common text-based content types.</p>
    76  
    77      <div class="example"><h3>Compress only a few types</h3><pre class="prettyprint lang-config">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript</pre>
    78  </div>
    79  
    80  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    81  <div class="section">
    82  <h2><a name="enable" id="enable">Enabling Compression</a></h2>
    83  
    84      <h3><a name="output" id="output">Output Compression</a></h3>
    85        <p>Compression is implemented by the <code>DEFLATE</code>
    86        <a href="../filter.html">filter</a>. The following directive
    87        will enable compression for documents in the container where it
    88        is placed:</p>
    89  
    90        <div class="example"><p><code>
    91          SetOutputFilter DEFLATE
    92        </code></p></div>
    93  
    94        <p>Some popular browsers cannot handle compression of all content
    95        so you may want to set the <code>gzip-only-text/html</code> note to
    96        <code>1</code> to only allow html files to be compressed (see
    97        below). If you set this to <em>anything but <code>1</code></em> it
    98        will be ignored.</p>
    99        
   100        <p>If you want to restrict the compression to particular MIME types
   101        in general, you may use the <code class="directive"><a href="../mod/core.html#addoutputfilterbytype">AddOutputFilterByType</a></code> directive. Here is an example of
   102        enabling compression only for the html files of the Apache
   103        documentation:</p>
   104  
   105        <div class="example"><p><code>
   106          &lt;Directory "/your-server-root/manual"&gt;<br />
   107          <span class="indent">
   108            AddOutputFilterByType DEFLATE text/html<br />
   109          </span>
   110          &lt;/Directory&gt;
   111        </code></p></div>
   112  
   113        <p>For browsers that have problems even with compression of all file
   114        types, use the <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code> directive to set the <code>no-gzip</code>
   115        note for that particular browser so that no compression will be
   116        performed. You may combine <code>no-gzip</code> with <code>gzip-only-text/html</code> to get the best results. In that case
   117        the former overrides the latter. Take a look at the following
   118        excerpt from the <a href="#recommended">configuration example</a>
   119        defined in the section above:</p>
   120  
   121        <div class="example"><p><code>
   122          BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
   123          BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
   124          BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html
   125        </code></p></div>
   126  
   127        <p>At first we probe for a <code>User-Agent</code> string that
   128        indicates a Netscape Navigator version of 4.x. These versions
   129        cannot handle compression of types other than
   130        <code>text/html</code>. The versions 4.06, 4.07 and 4.08 also
   131        have problems with decompressing html files. Thus, we completely
   132        turn off the deflate filter for them.</p>
   133  
   134        <p>The third <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>
   135        directive fixes the guessed identity of the user agent, because
   136        the Microsoft Internet Explorer identifies itself also as "Mozilla/4"
   137        but is actually able to handle requested compression. Therefore we
   138        match against the additional string "MSIE" (<code>\b</code> means
   139        "word boundary") in the <code>User-Agent</code> Header and turn off
   140        the restrictions defined before.</p>
   141  
   142        <div class="note"><h3>Note</h3>
   143          The <code>DEFLATE</code> filter is always inserted after RESOURCE
   144          filters like PHP or SSI. It never touches internal subrequests.
   145        </div>
   146        <div class="note"><h3>Note</h3>
   147          There is an environment variable <code>force-gzip</code>,
   148          set via <code class="directive"><a href="../mod/mod_env.html#setenv">SetEnv</a></code>, which
   149          will ignore the accept-encoding setting of your browser and will
   150          send compressed output.
   151        </div>
   152  
   153      
   154      <h3><a name="inflate" id="inflate">Output Decompression</a></h3>
   155        <p>The <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code> module also provides a filter for
   156        inflating/uncompressing a gzip compressed response body. In order to activate
   157        this feature you have to insert the <code>INFLATE</code> filter into
   158        the output filter chain using <code class="directive"><a href="../mod/core.html#setoutputfilter">SetOutputFilter</a></code> or <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>, for example:</p>
   159  
   160        <div class="example"><p><code>
   161          &lt;Location /dav-area&gt;<br />
   162          <span class="indent">
   163            ProxyPass http://example.com/<br />
   164            SetOutputFilter INFLATE<br />
   165          </span>
   166          &lt;/Location&gt;
   167        </code></p></div>
   168  
   169        <p>This Example will uncompress gzip'ed output from example.com, so other
   170        filters can do further processing with it.
   171        </p>
   172        
   173      
   174      <h3><a name="input" id="input">Input Decompression</a></h3>
   175        <p>The <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code> module also provides a filter for
   176        decompressing a gzip compressed request body . In order to activate
   177        this feature you have to insert the <code>DEFLATE</code> filter into
   178        the input filter chain using <code class="directive"><a href="../mod/core.html#setinputfilter">SetInputFilter</a></code> or <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>, for example:</p>
   179  
   180        <div class="example"><p><code>
   181          &lt;Location /dav-area&gt;<br />
   182          <span class="indent">
   183            SetInputFilter DEFLATE<br />
   184          </span>
   185          &lt;/Location&gt;
   186        </code></p></div>
   187        
   188        <p>Now if a request contains a <code>Content-Encoding:
   189        gzip</code> header, the body will be automatically decompressed.
   190        Few browsers have the ability to gzip request bodies. However,
   191        some special applications actually do support request
   192        compression, for instance some <a href="http://www.webdav.org">WebDAV</a> clients.</p>
   193  
   194        <div class="warning"><h3>Note on Content-Length</h3>
   195          <p>If you evaluate the request body yourself, <em>don't trust
   196          the <code>Content-Length</code> header!</em>
   197          The Content-Length header reflects the length of the
   198          incoming data from the client and <em>not</em> the byte count of
   199          the decompressed data stream.</p>
   200        </div>
   201      
   202  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   203  <div class="section">
   204  <h2><a name="proxies" id="proxies">Dealing with proxy servers</a></h2>
   205  
   206      <p>The <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code> module sends a <code>Vary:
   207      Accept-Encoding</code> HTTP response header to alert proxies that
   208      a cached response should be sent only to clients that send the
   209      appropriate <code>Accept-Encoding</code> request header.  This
   210      prevents compressed content from being sent to a client that will
   211      not understand it.</p>
   212  
   213      <p>If you use some special exclusions dependent
   214      on, for example, the <code>User-Agent</code> header, you must 
   215      manually configure an addition to the <code>Vary</code> header
   216      to alert proxies of the additional restrictions.  For example,
   217      in a typical configuration where the addition of the <code>DEFLATE</code>
   218      filter depends on the <code>User-Agent</code>, you should add:</p>
   219  
   220      <div class="example"><p><code>
   221        Header append Vary User-Agent
   222      </code></p></div>
   223      
   224      <p>If your decision about compression depends on other information
   225      than request headers (<em>e.g.</em> HTTP version), you have to set the
   226      <code>Vary</code> header to the value <code>*</code>. This prevents
   227      compliant proxies from caching entirely.</p>
   228  
   229      <div class="example"><h3>Example</h3><p><code>
   230        Header set Vary *
   231      </code></p></div>
   232  </div>
   233  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   234  <div class="directive-section"><h2><a name="DeflateBufferSize" id="DeflateBufferSize">DeflateBufferSize</a> <a name="deflatebuffersize" id="deflatebuffersize">Directive</a></h2>
   235  <table class="directive">
   236  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Fragment size to be compressed at one time by zlib</td></tr>
   237  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateBufferSize <var>value</var></code></td></tr>
   238  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DeflateBufferSize 8096</code></td></tr>
   239  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   240  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   241  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   242  </table>
   243      <p>The <code class="directive">DeflateBufferSize</code> directive specifies
   244      the size in bytes of the fragments that zlib should compress at one
   245      time.</p>
   246  
   247  </div>
   248  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   249  <div class="directive-section"><h2><a name="DeflateCompressionLevel" id="DeflateCompressionLevel">DeflateCompressionLevel</a> <a name="deflatecompressionlevel" id="deflatecompressionlevel">Directive</a></h2>
   250  <table class="directive">
   251  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>How much compression do we apply to the output</td></tr>
   252  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateCompressionLevel <var>value</var></code></td></tr>
   253  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Zlib's default</code></td></tr>
   254  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   255  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   256  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   257  <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>This directive is available since Apache 2.0.45</td></tr>
   258  </table>
   259      <p>The <code class="directive">DeflateCompressionLevel</code> directive specifies
   260          what level of compression should be used, the higher the value, 
   261          the better the compression, but the more CPU time is required to
   262          achieve this.</p>
   263      <p>The value must between 1 (less compression) and 9 (more compression).</p>
   264  
   265  </div>
   266  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   267  <div class="directive-section"><h2><a name="DeflateFilterNote" id="DeflateFilterNote">DeflateFilterNote</a> <a name="deflatefilternote" id="deflatefilternote">Directive</a></h2>
   268  <table class="directive">
   269  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Places the compression ratio in a note for logging</td></tr>
   270  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateFilterNote [<var>type</var>] <var>notename</var></code></td></tr>
   271  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   272  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   273  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   274  <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td><var>type</var> is available since Apache 2.0.45</td></tr>
   275  </table>
   276      <p>The <code class="directive">DeflateFilterNote</code> directive
   277      specifies that a note about compression ratios should be attached
   278      to the request. The name of the note is the value specified for
   279      the directive. You can use that note for statistical purposes by
   280      adding the value to your <a href="../logs.html#accesslog">access log</a>.</p>
   281  
   282      <div class="example"><h3>Example</h3><p><code>
   283        DeflateFilterNote ratio<br />
   284        <br />
   285        LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate<br />
   286        CustomLog logs/deflate_log deflate
   287      </code></p></div>
   288  
   289      <p>If you want to extract more accurate values from your logs, you
   290      can use the <var>type</var> argument to specify the type of data
   291      left as a note for logging. <var>type</var> can be one of:</p>
   292  
   293      <dl>
   294        <dt><code>Input</code></dt>
   295        <dd>Store the byte count of the filter's input stream in the note.</dd>
   296  
   297        <dt><code>Output</code></dt>
   298        <dd>Store the byte count of the filter's output stream in the note.</dd>
   299  
   300        <dt><code>Ratio</code></dt>
   301        <dd>Store the compression ratio (<code>output/input * 100</code>)
   302        in the note. This is the default, if the <var>type</var> argument
   303        is omitted.</dd>
   304      </dl>
   305  
   306      <p>Thus you may log it this way:</p>
   307  
   308      <div class="example"><h3>Accurate Logging</h3><p><code>
   309        DeflateFilterNote Input instream<br />
   310        DeflateFilterNote Output outstream<br />
   311        DeflateFilterNote Ratio ratio<br />
   312        <br />
   313        LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate<br />
   314        CustomLog logs/deflate_log deflate
   315      </code></p></div>
   316  
   317  <h3>See also</h3>
   318  <ul>
   319  <li><code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code></li>
   320  </ul>
   321  </div>
   322  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   323  <div class="directive-section"><h2><a name="DeflateInflateLimitRequestBody" id="DeflateInflateLimitRequestBody">DeflateInflateLimitRequestBody</a> <a name="deflateinflatelimitrequestbody" id="deflateinflatelimitrequestbody">Directive</a></h2>
   324  <table class="directive">
   325  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum size of inflated request bodies</td></tr>
   326  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateInflateLimitRequestBody<var>value</var></code></td></tr>
   327  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>None, but LimitRequestBody applies after deflation</code></td></tr>
   328  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
   329  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   330  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   331  <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.2.28 and later</td></tr>
   332  </table>
   333      <p>The <code class="directive">DeflateInflateLimitRequestBody</code> directive 
   334          specifies the maximum size of an inflated request body. If it is unset,
   335          <code class="directive"><a href="../mod/core.html#limitrequestbody">LimitRequestBody</a></code> is applied to the
   336          inflated body.</p>
   337  
   338  </div>
   339  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   340  <div class="directive-section"><h2><a name="DeflateInflateRatioBurst" id="DeflateInflateRatioBurst">DeflateInflateRatioBurst</a> <a name="deflateinflateratioburst" id="deflateinflateratioburst">Directive</a></h2>
   341  <table class="directive">
   342  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of times the inflation ratio for request bodies 
   343               can be crossed</td></tr>
   344  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateInflateRatioBurst <var>value</var></code></td></tr>
   345  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>3</code></td></tr>
   346  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
   347  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   348  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   349  <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.2.28 and later</td></tr>
   350  </table>
   351      <p>The <code class="directive">DeflateInflateRatioBurst</code> directive 
   352         specifies the maximum number of times the 
   353         <code class="directive">DeflateInflateRatioLimit</code> can be crossed before 
   354         terminating the request.</p>
   355  
   356  </div>
   357  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   358  <div class="directive-section"><h2><a name="DeflateInflateRatioLimit" id="DeflateInflateRatioLimit">DeflateInflateRatioLimit</a> <a name="deflateinflateratiolimit" id="deflateinflateratiolimit">Directive</a></h2>
   359  <table class="directive">
   360  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum inflation ratio for request bodies</td></tr>
   361  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateInflateRatioLimit <var>value</var></code></td></tr>
   362  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>200</code></td></tr>
   363  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
   364  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   365  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   366  <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.2.28 and later</td></tr>
   367  </table>
   368      <p>The <code class="directive">DeflateInflateRatioLimit</code> directive 
   369          specifies the maximum ratio of deflated to inflated size of an 
   370          inflated request body. This ratio is checked as the body is
   371          streamed in, and if crossed more than 
   372          <code class="directive">DeflateInflateRatioBurst</code> times, the request
   373          will be terminated.</p>
   374  
   375  </div>
   376  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   377  <div class="directive-section"><h2><a name="DeflateMemLevel" id="DeflateMemLevel">DeflateMemLevel</a> <a name="deflatememlevel" id="deflatememlevel">Directive</a></h2>
   378  <table class="directive">
   379  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>How much memory should be used by zlib for compression</td></tr>
   380  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateMemLevel <var>value</var></code></td></tr>
   381  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DeflateMemLevel 9</code></td></tr>
   382  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   383  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   384  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   385  </table>
   386      <p>The <code class="directive">DeflateMemLevel</code> directive specifies
   387      how much memory should be used by zlib for compression
   388      (a value between 1 and 9).</p>
   389  
   390  </div>
   391  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   392  <div class="directive-section"><h2><a name="DeflateWindowSize" id="DeflateWindowSize">DeflateWindowSize</a> <a name="deflatewindowsize" id="deflatewindowsize">Directive</a></h2>
   393  <table class="directive">
   394  <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Zlib compression window size</td></tr>
   395  <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DeflateWindowSize <var>value</var></code></td></tr>
   396  <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DeflateWindowSize 15</code></td></tr>
   397  <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
   398  <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
   399  <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_deflate</td></tr>
   400  </table>
   401      <p>The <code class="directive">DeflateWindowSize</code> directive specifies the
   402      zlib compression window size (a value between 1 and 15). Generally, the
   403      higher the window size, the higher can the compression ratio be expected.</p>
   404  
   405  </div>
   406  </div>
   407  <div class="bottomlang">
   408  <p><span>Available Languages: </span><a href="../en/mod/mod_deflate.html" title="English">&nbsp;en&nbsp;</a> |
   409  <a href="../ja/mod/mod_deflate.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
   410  <a href="../ko/mod/mod_deflate.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
   411  </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
   412  <script type="text/javascript"><!--//--><![CDATA[//><!--
   413  var comments_shortname = 'httpd';
   414  var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_deflate.html';
   415  (function(w, d) {
   416      if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
   417          d.write('<div id="comments_thread"><\/div>');
   418          var s = d.createElement('script');
   419          s.type = 'text/javascript';
   420          s.async = true;
   421          s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
   422          (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
   423      }
   424      else { 
   425          d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
   426      }
   427  })(window, document);
   428  //--><!]]></script></div><div id="footer">
   429  <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
   430  <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
   431  if (typeof(prettyPrint) !== 'undefined') {
   432      prettyPrint();
   433  }
   434  //--><!]]></script>
   435  </body></html>