Module mod_deflate

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

Summary

Module mod_deflate specifies compression and decompression functions using filters, MIME types, environment variables, and HTTP responses. Compressed output is transferred to requesting client browsers at a higher rate of speed than uncompressed output. Compression and decompression is implemented by the DEFLATE filter, located in module mod_deflate. See Apache HTTP Server Version 2.0 Documentation Link outside Information Center for additional information and examples on configuring the Apache server to use compression.

Directives

DeflateBufferSize

Module: mod_deflate
Syntax: DeflateBufferSize value
Default: DeflateBufferSize 8096
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
Example: DeflateBufferSize 8096

The DeflateBufferSize directive specifies the size of the fragments that zlib should compress at one time.

Parameter: value
  • The value parameter specifies the size, in bytes, of the fragments that zlib should compress at one time.

DeflateCompressionLevel

Module: mod_deflate
Syntax: DeflateCompressionLevel value
Default: DeflateCompressionLevel 6
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
Example: DeflateCompressionLevel 5

The DeflateCompressionLevel directive specifies what level of compression should be used.

Parameter: value
  • The value parameter value specifies the level of compression. The higher the value, the greater the compression.
    Note: Higher compression levels require additional CPU time.

DeflateFilterNote

Module: mod_deflate
Syntax: DeflateFilterNote [type] notename
Default: none
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
Example: DeflateFilterNote ratio
Example: DeflateFilterNote Ratio ratio
Example: DeflateFilterNote Input input
Example: DeflateFilterNote input input

The DeflateFilterNote directive specifies that a note about compression ratios should be attached to the request. The note is used for statistical purposes by adding a value to your access log.

Parameter One: type
  • The type parameter value specifies what type of data is added to the note for logging. The parameter value is not case-sensitive. Possible values include:
    Input
    Store the byte count of the filter's input stream in the note.
    Output
    Store the byte count of the filter's output stream in the note.
    Ratio
    Store the compression ratio (output/input * 100) in the note. This is the default, if the type argument is omitted.
Parameter Two: notename
  • The notename parameter value specifies the note name entered in the log. The notename value is not required to match the type value. Blank characters are not valid.
Example: accurate logging
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate_log deflate

DeflateMemLevel

Module: mod_deflate
Syntax: DeflateMemLevel value
Default: DeflateMemLevel 9
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
Example: DeflateMemLevel 8

The DeflateMemLevel directive specifies how much memory should be used for zlib for compression.

Parameter: value
  • The value parameter value specifies how much memory should be used for zlib compression. Each value is equal to 16K. For example, a value of 1 equates to 16K, while a value of 8 equates to 128K.

DeflateWindowSize

Module: mod_deflate
Syntax: DeflateWindowSize value
Default: DeflateWindowSize 15
Context: server config, virtual host
Override: none
Origin: Apache
Usage Considerations: A LoadModule is required in the configuration file prior to using the directive. The statement should be as follows: deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
Example: DeflateWindowSize 14

The DeflateWindowSize directive specifies the zlib compression window size.

Parameter: value
  • The value parameter value specifies the level of compression window size. The higher the value, the greater the compression window size.
    Note: Higher compression levels require additional CPU time.