<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 421174 -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_deflate.xml.meta">

<name>mod_deflate</name>
<description>³»¿ëÀ» Å¬¶óÀÌ¾ðÆ®·Î º¸³»±â Àü¿¡ ¾ÐÃàÇÑ´Ù</description>
<status>Extension</status>
<sourcefile>mod_deflate.c</sourcefile>
<identifier>deflate_module</identifier>

<summary>
    <p><module>mod_deflate</module> ¸ðµâÀº ¼­¹öÀÇ Ãâ·ÂÀ» ³×Æ®¿÷À¸·Î
    Å¬¶óÀÌ¾ðÆ®¿¡ º¸³»±â Àü¿¡ ¾ÐÃàÇÏ´Â <code>DEFLATE</code> Ãâ·ÂÇÊÅÍ¸¦
    Á¦°øÇÑ´Ù.</p>
</summary>
<seealso><a href="../filter.html">ÇÊÅÍ</a></seealso>

<section id="recommended"><title>±ÇÀåÇÏ´Â ¼³Á¤</title>
    <p>±ÞÇÑ »ç¶÷À» À§ÇÑ °ßº» ¼³Á¤ÀÌ´Ù.</p>

    <example><title>ÀÏºÎ type¸¸ ¾ÐÃà</title>
      AddOutputFilterByType DEFLATE text/html text/plain text/xml
    </example>

    <p>¾Æ·¡ ¼³Á¤Àº ¿ä¾àÇÏ¿´Áö¸¸ ±×·¡µµ º¹ÀâÇÏ´Ù. ¼³Á¤À» ¿ÏÀüÈ÷
    ÀÌÇØÇÑ ÈÄ »ç¿ëÇÏ¶ó.</p>

    <example><title>ÀÌ¹ÌÁö¸¦ Á¦¿ÜÇÑ ¸ðµç °ÍÀ» ¾ÐÃà</title>
      &lt;Location /&gt;<br />
      <indent>
        # ÇÊÅÍ¸¦ Ãß°¡ÇÑ´Ù<br />
        SetOutputFilter DEFLATE<br />
        <br />
        # Netscape 4.x¿¡ ¹®Á¦°¡ ÀÖ´Ù...<br />
        BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
        <br />
        # Netscape 4.06-4.08¿¡ ´õ ¹®Á¦°¡ ÀÖ´Ù<br />
        BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
        <br />
        # MSIEÀº Netscape¶ó°í ÀÚ½ÅÀ» ¾Ë¸®Áö¸¸, ¹®Á¦°¡ ¾ø´Ù<br />
        # BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html<br />
        <br />
        # ÁÖÀÇ: ¾ÆÆÄÄ¡ 2.0.48±îÁö mod_setenvifÀÇ ¹ö±×¶§¹®¿¡<br />
        # À§ÀÇ Á¤±ÔÇ¥Çö½ÄÀº µ¿ÀÛÇÏÁö ¾Ê´Â´Ù. ¿øÇÏ´Â È¿°ú¸¦<br />
        # ¾ò±âÀ§ÇØ ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÏ¿© »ç¿ëÇÑ´Ù:<br />
        BrowserMatch \bMSI[E]           !no-gzip !gzip-only-text/html<br />
        <br />
        # ÀÌ¹ÌÁö¸¦ ¾ÐÃàÇÏÁö ¾Ê´Â´Ù<br />
        SetEnvIfNoCase Request_URI \<br />
        <indent>
          \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
        </indent>
        <br />
        # ÇÁ·Ï½Ã°¡ Àß¸øµÈ ³»¿ëÀ» Àü´ÞÇÏÁö¾Êµµ·Ï ÇÑ´Ù<br />
        Header append Vary User-Agent env=!dont-vary<br />
      </indent>
      &lt;/Location&gt;
    </example>

</section>

<section id="enable"><title>¾ÐÃàÇÏ±â</title>

    <section id="output"><title>Ãâ·Â ¾ÐÃà</title>
      <p><code>DEFLATE</code> <a href="../filter.html">ÇÊÅÍ</a>°¡
      ¾ÐÃàÀ» ÇÑ´Ù. ´ÙÀ½ Áö½Ã¾î´Â Áö½Ã¾î°¡ ÀÖ´Â À§Ä¡ÀÇ ¹®¼­¸¦
      ¾ÐÃàÇÑ´Ù:</p>

      <example>
        SetOutputFilter DEFLATE
      </example>

      <p>¸ðµç ³»¿ëÀ» ¾ÐÃàÇÏ¸é Ã³¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú°¡ ÀÖ±â¶§¹®¿¡
      html ÆÄÀÏ¸¸À» ¾ÐÃàÇÏ±âÀ§ÇØ (¾Æ·¡ Âü°í)
      <code>gzip-only-text/html</code>À» <code>1</code>·Î ¼³Á¤ÇÒÁöµµ
      ¸ð¸¥´Ù. ÀÌ¸¦ <em><code>1</code>ÀÌ ¾Æ´Ñ °ªÀ¸·Î</em> ¼³Á¤ÇÏ¸é
      ¹«½ÃÇÑ´Ù.</p>
      
      <p>º¸Åë Æ¯º°ÇÑ MIME type¸¸ ¾ÐÃàÇÏ·Á¸é <directive module="core"
      >AddOutputFilterByType</directive> Áö½Ã¾î¸¦ »ç¿ëÇÑ´Ù.
      ´ÙÀ½ ¼³Á¤Àº html ÆÄÀÏ¸¸À» ¾ÐÃàÇÑ´Ù:</p>

      <example>
        &lt;Directory "/your-server-root/manual"&gt;<br />
        <indent>
          AddOutputFilterByType DEFLATE text/html<br />
        </indent>
        &lt;/Directory&gt;
      </example>

      <p>¾ÐÃàÇÑ ÆÄÀÏÀ» Ã³¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú¿¡°Ô´Â ¾ÐÃàÇÏÁö¾Ê°í
      º¸³»±æÀ§ÇØ <directive module="mod_setenvif"
      >BrowserMatch</directive> Áö½Ã¾î¿¡ <code>no-gzip</code>À»
      ¼³Á¤ÇÑ´Ù. ÃÖÀûÀÇ °á°ú¸¦ ¾ò±âÀ§ÇØ <code>no-gzip</code>°ú
      <code>gzip-only-text/html</code>À» °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
      ÀÌ °æ¿ì ÀüÀÚ°¡ ÈÄÀÚ¸¦ ¹«½ÃÇÑ´Ù. À§ ÀýÀÇ <a
      href="#recommended">¼³Á¤ ¿¹Á¦</a> ÀÏºÎ¸¦ »ìÆìº¸ÀÚ:</p>

      <example>
        BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
        BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
        BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html
      </example>

      <p>¸ÕÀú <code>User-Agent</code> ¹®ÀÚ¿­À» º¸°í Netscape
      Navigator ¹öÀü 4.xÀÎÁö °Ë»çÇÑ´Ù. ÀÌ ¹öÀüÀº <code>text/html</code>ÀÌ
      ¾Æ´Ñ typeÀÇ ¾ÐÃàÀ» Ã³¸®ÇÏÁö ¸øÇÑ´Ù. ¹öÀü 4.06, 4.07, 4.08Àº
      html ÆÄÀÏ ¾ÐÃàÀ» Ã³¸®ÇÏ´Â´ëµµ ¹®Á¦°¡ ÀÖ´Ù. ±×·¡¼­ ¿ì¸®´Â
      ÀÌ °æ¿ì deflate ÇÊÅÍ¸¦ ¿ÏÀüÈ÷ »ç¿ëÇÏÁö¾Ê´Â´Ù.</p>

      <p>¼¼¹øÂ° <directive module="mod_setenvif">BrowserMatch</directive>
      Áö½Ã¾î´Â Microsoft Internet Explorer°¡ ÀÚ½ÅÀ» "Mozilla/4"·Î
      ¾Ë¸®Áö¸¸ ¾ÐÃàµÈ ¿äÃ»À» Ã³¸®ÇÒ ¼ö ÀÖ±â¶§¹®¿¡ user agent
      ÃßÃøÀ» ¼öÁ¤ÇÑ´Ù. <code>User-Agent</code> Çì´õ¿¡¼­ "MSIE"
      (<code>\b</code>´Â "´Ü¾î °æ°è"¸¦ ¶æÇÑ´Ù) ¹®ÀÚ¿­À» ¹ß°ßÇÏ¸é
      ¾Õ¿¡¼­ ¼³Á¤ÇÑ Á¦¾àÀ» Ç¬´Ù.</p>

      <note><title>ÁÖÀÇ</title>
        <code>DEFLATE</code> ÇÊÅÍ´Â Ç×»ó PHP³ª SSI¿Í °°Àº RESOURCE
        ÇÊÅÍ µÚ¿¡ µé¾î°£´Ù. ¶Ç, ³»ºÎ ÇÏÀ§¿äÃ»(subrequest)¿¡ ¿µÇâÀ»
        ÁÖÁö ¾Ê´Â´Ù.
      </note>
    </section>

    <section id="input"><title>ÀÔ·Â ¾ÐÃàÇ®±â</title>
      <p><module>mod_deflate</module> ¸ðµâÀº gzipÀ¸·Î ¾ÐÃàµÈ ¿äÃ»
      ³»¿ëÀ» Çª´Â ÇÊÅÍµµ Á¦°øÇÑ´Ù. ÀÌ ±â´ÉÀ» »ç¿ëÇÏ·Á¸é ´ÙÀ½°ú
      °°ÀÌ <directive module="core">SetInputFilter</directive>³ª
      <directive module="mod_mime">AddInputFilter</directive>¸¦
      »ç¿ëÇÏ¿© ÀÔ·ÂÇÊÅÍ¼ø¼­¿¡ <code>DEFLATE</code> ÇÊÅÍ¸¦
      Ãß°¡ÇÑ´Ù.</p>

      <example>
        &lt;Location /dav-area&gt;<br />
        <indent>
          SetInputFilter DEFLATE<br />
        </indent>
        &lt;/Location&gt;
      </example>
      
      <p>¿äÃ»¿¡ <code>Content-Encoding: gzip</code> Çì´õ°¡ ÀÖ´Ù¸é
      ÀÚµ¿À¸·Î ¾ÐÃàµÈ ³»¿ëÀ» Ç¬´Ù. gzip ¿äÃ»À» ÇÒ ¼ö ÀÖ´Â
      ºê¶ó¿ìÀú´Â µå¹°´Ù. ±×·¯³ª ¾î¶² <a
      href="http://www.webdav.org">WebDAV</a> Å¬¶óÀÌ¾ðÆ®¿Í °°Àº
      Æ¯º°ÇÑ ÇÁ·Î±×·¥Àº ¿äÃ» ¾ÐÃàÀ» Áö¿øÇÑ´Ù.</p>

      <note type="warning"><title>Content-Length¿¡ ´ëÇÑ ÁÖÀÇ</title>
        <p>¿äÃ» ³»¿ëÀ» Á÷Á¢ »ìÆìº»´Ù¸é, <em><code>Content-Length</code>
        Çì´õ¸¦ ¹ÏÁö¸¶¶ó!</em> Content-Length Çì´õ´Â Å¬¶óÀÌ¾ðÆ®°¡
        º¸³½ ³»¿ëÀÇ ±æÀÌÀÌÁö, ¾ÐÃàÀ» Ç¬ °á°úÀÇ ¹ÙÀÌÆ®¼ö°¡
        <em>¾Æ´Ï´Ù</em>.</p>
      </note>
    </section>
</section>

<section id="proxies"><title>ÇÁ·Ï½Ã ¼­¹ö ´Ù·ç±â</title>

    <p><module>mod_deflate</module> ¸ðµâÀº ÇÁ·Ï½Ã°¡ ÀÚ½ÅÀÌ Ä³½¬ÇÑ
    ÀÀ´äÀ» ÀûÀýÇÑ <code>Accept-Encoding</code> ¿äÃ» Çì´õ¸¦ º¸³½
    Å¬¶óÀÌ¾ðÆ®¿¡°Ô¸¸ º¸³»µµ·Ï <code>Vary:
    Accept-Encoding</code> HTTP ÀÀ´ä Çì´õ¸¦ Ãß°¡ÇÑ´Ù. ±×·¡¼­
    ¾ÐÃàµÈ ³»¿ëÀ» ÀÌÇØÇÒ ¼ö ¾ø´Â Å¬¶óÀÌ¾ðÆ®¿¡ ¾ÐÃàµÈ ³»¿ëÀ»
    º¸³»Áö¾Êµµ·Ï ÇÑ´Ù.</p>

    <p>¿¹¸¦ µé¾î, <code>User-Agent</code> Çì´õ µî¿¡ µû¶ó Æ¯º°È÷
    ÇÊÅÍ Àû¿ëÀ» Ãë¼ÒÇÑ´Ù¸é, ÇÁ·Ï½Ã¿¡°Ô ÀÌ·¯ÇÑ Á¦ÇÑÀ» ¾Ë·ÁÁÖ±âÀ§ÇØ
    Á÷Á¢ <code>Vary</code> Çì´õ¿¡ Ãß°¡ÇØ¾ß ÇÑ´Ù. ¿¹¸¦ µé¾î,
    ¼³Á¤ÀÌ <code>User-Agent</code>¿¡ µû¶ó <code>DEFLATE</code>
    ÇÊÅÍ¸¦ Ãß°¡ÇÑ´Ù¸é ´ÙÀ½À» »ç¿ëÇÑ´Ù:</p>

    <example>
      Header append Vary User-Agent
    </example>
    
    <p>¿äÃ» Çì´õ¿ÜÀÇ ´Ù¸¥ Á¤º¸¿¡ (<em>¿¹¸¦ µé¾î</em>, HTTP ¹öÀü)
    µû¶ó ¾ÐÃà ¿©ºÎ°¡ °áÁ¤µÈ´Ù¸é, <code>Vary</code> Çì´õ°ªÀ»
    <code>*</code>·Î ¼³Á¤ÇØ¾ß ÇÑ´Ù. ±×·¯¸é Ç¥ÁØÀ» µû¸£´Â ÇÁ·Ï½Ã´Â
    Ä³½¬¸¦ ÇÏÁö ¾Ê°Ô µÈ´Ù.</p>

    <example><title>¿¹Á¦</title>
      Header set Vary *
    </example>
</section>

<directivesynopsis>
<name>DeflateFilterNote</name>
<description>¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù</description>
<syntax>DeflateFilterNote [<var>type</var>] <var>notename</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility><var>type</var>Àº ¾ÆÆÄÄ¡ 2.0.45 ºÎÅÍ</compatibility>

<usage>
    <p><directive>DeflateFilterNote</directive> Áö½Ã¾î´Â ¿äÃ»ÀÇ
    ¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÏ´Â ±âÈ£¸¦ ÁöÁ¤ÇÑ´Ù. ±âÈ£ ÀÌ¸§Àº Áö½Ã¾î·Î
    ÁöÁ¤ÇÑ °ªÀÌ´Ù. Åë°è¸¦ À§ÇØ <a href="../logs.html#accesslog">Á¢±Ù
    ·Î±×</a>¿¡¼­ ±âÈ£¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>

    <example><title>¿¹Á¦</title>
      DeflateFilterNote ratio<br />
      <br />
      LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate<br />
      CustomLog logs/deflate_log deflate
    </example>

    <p>·Î±×¿¡¼­ ´õ Á¤È®ÇÑ °ªÀ» ÃßÃâÇÏ·Á¸é <var>type</var> ¾Æ±Ô¸ÕÆ®·Î
    ±â·ÏÇÒ ÀÚ·á¸¦ ¼±ÅÃÇÑ´Ù. <var>type</var>´Â ´ÙÀ½Áß ÇÏ³ªÀÌ´Ù:</p>

    <dl>
      <dt><code>Input</code></dt>
      <dd>ÇÊÅÍ ÀÔ·Â½ºÆ®¸²ÀÇ ¹ÙÀÌÆ®¼ö¸¦ ÀúÀåÇÑ´Ù.</dd>

      <dt><code>Output</code></dt>
      <dd>ÇÊÅÍ Ãâ·Â½ºÆ®¸²ÀÇ ¹ÙÀÌÆ®¼ö¸¦ ÀúÀåÇÑ´Ù..</dd>

      <dt><code>Ratio</code></dt>
      <dd>¾ÐÃà·üÀ» (<code>output/input * 100</code>) ÀúÀåÇÑ´Ù.
       <var>type</var> ¾Æ±Ô¸ÕÆ®¸¦ »ý·«ÇÏ¸é »ç¿ëÇÏ´Â ±âº»°ªÀÌ´Ù.</dd>
    </dl>

    <p>±×·¡¼­ ÀÌ·¸°Ô ·Î±×¿¡ ±â·ÏÇÒ ¼ö ÀÖ´Ù:</p>

    <example><title>Á¤¹ÐÇÑ ·Î±×</title>
      DeflateFilterNote Input instream<br />
      DeflateFilterNote Output outstream<br />
      DeflateFilterNote Ratio ratio<br />
      <br />
      LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate<br />
      CustomLog logs/deflate_log deflate
    </example>
</usage>
<seealso><module>mod_log_config</module></seealso>
</directivesynopsis>

<directivesynopsis>
<name>DeflateBufferSize</name>
<description>zlibÀÌ ÇÑ¹ø¿¡ ¾ÐÃàÇÒ Å©±â</description>
<syntax>DeflateBufferSize <var>value</var></syntax>
<default>DeflateBufferSize 8096</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateBufferSize</directive> Áö½Ã¾î´Â zlibÀÌ
    ÇÑ¹ø¿¡ ¾ÐÃàÇÒ ¹ÙÀÌÆ®¼ö¸¦ ÁöÁ¤ÇÑ´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>DeflateWindowSize</name>
<description>Zlib ¾ÐÃà window size</description>
<syntax>DeflateWindowSize <var>value</var></syntax>
<default>DeflateWindowSize 15</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateWindowSize</directive> Áö½Ã¾î´Â zlib
    ¾ÐÃà window size¸¦ (1°ú 15 »çÀÌÀÇ °ª) ÁöÁ¤ÇÑ´Ù. ÀÏ¹ÝÀûÀ¸·Î
    window size°¡ Å¬¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÑ´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>

<name>DeflateMemLevel</name>
<description>zlibÀÌ ¾ÐÃàÇÒ¶§ »ç¿ëÇÏ´Â ¸Þ¸ð¸®·®</description>
<syntax>DeflateMemLevel <var>value</var></syntax>
<default>DeflateMemLevel 9</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateMemLevel</directive> Áö½Ã¾î´Â zlibÀÌ
    ¾ÐÃàÇÒ¶§ ¾ó¸¶¸¸Å­ ¸Þ¸ð¸®¸¦ »ç¿ëÇÒÁö °áÁ¤ÇÑ´Ù. (1°ú 9 »çÀÌÀÇ
    °ª)</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>DeflateCompressionLevel</name>
<description>Ãâ·ÂÀ» ¾î´ÀÁ¤µµ ¾ÐÃàÇÏ´Â°¡</description>
<syntax>DeflateCompressionLevel <var>value</var></syntax>
<default>Zlib's default</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility>¾ÆÆÄÄ¡ 2.0.45 ºÎÅÍ</compatibility>

<usage>
    <p><directive>DeflateCompressionLevel</directive> Áö½Ã¾î´Â
        »ç¿ëÇÒ ¾ÐÃà¼öÁØÀ» ¼±ÅÃÇÑ´Ù. °ªÀÌ Å¬¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÏÁö¸¸,
        CPU¸¦ ´õ ¸¹ÀÌ »ç¿ëÇÑ´Ù.</p>
    <p>(°¡Àå ´ú ¾ÐÃà) 1°ú (°¡Àå ¸¹ÀÌ ¾ÐÃà) 9 »çÀÌÀÇ °ªÀ» ÁöÁ¤ÇÑ´Ù.</p>
</usage>
</directivesynopsis>


</modulesynopsis>

