Mod deflate
mod_deflate is an optional module for the Apache HTTP Server, Apache v2.0 and later.[src] It is based on Deflate lossless data compression algorithm that uses a combination of the LZ77 algorithm and Huffman coding.[src] This module provides the DEFLATE output filter that allows output from Apache HTTP server to be compressed before being sent to the client over the network.[src] It also provides a filter for decompressing (inflating, uncompressing) a gzip compressed response body.[src]
mod_deflate is an optional module for the Apache HTTP Server, Apache v2.0 and later.[src] It is based on Deflate lossless data compression algorithm that uses a combination of the LZ77 algorithm and Huffman coding.[src] This module provides the DEFLATE output filter that allows output from Apache HTTP server to be compressed before being sent to the client over the network.[src] It also provides a filter for decompressing (inflating, uncompressing) a gzip compressed response body.[src] ==Limitation== The mod_deflate module does not have a lower bound for file size, so it attempts to compress files that are too small to benefit from compression.[src] This results in files smaller than approximately 120 bytes becoming larger when processed by mod_deflate.[src] ==Compatibility== You can check a server to see if it is sending out compressed data, and compression compatibility of your browser for example here.[src] When textual content compressed using mod_gzip, it should maintain its MIME-type, according to their recommended media type: HTML: text/html XHTML: application/xhtml+xml CSS: text/css JavaScript: application/x-javascript ==Alternatives== The mod_gzip module is similar to mod_deflate, for Apache v1 and v2.[src] A mod_gz module was independently developed by Ian Holsman.[src] This module implements a gzip compression filter for Apache 2.0, providing similar functionality to mod_gzip.[src] One important difference between the two modules is that mod_gzip includes its own gzip implementation, whereas mod_gz relies on an external zlib library.[src] In PHP, a similar effect is achievable for the output of PHP scripts with: the ob_gzhandler() and the gzencode() functions; zlib.output_compression option in the php.ini file.[src] CherryPy offers the Gzip filter, which uses the zlib module of Python standard library.[src] ==License== The mod_deflate module is part of Apache v2, licensed with Apache License 2.0.[src] ==History== Module level content compression for Apache started with mod_gzip, which is an external extension module, since Apache 1.3.[src] The developers of the Apache 2.0.x servers have included mod_deflate in the codebase for the server to perform a similar GZIP-encoding function.[src] Early versions provided lesser amount of compression than mod_gzip.[src] Starting with Apache 2.0.45, the compression level of mod_deflate is configurable using the DeflateCompressionLevel directive.[src] This directive accepts values between 1 (fastest compression speed, lowest compression ratio) and 9 (slowest compression speed, highest compression ratio), with the default value being 6.[src] This change made the compression in mod_deflate comparable to mod_gzip out of the box.[src] ==See also== HTTP compression Some general purpose Apache modules Some programming language interfaces for Apache ==Notes== ==External links== Apache Module mod_deflate — for Apache 2.0.[src] Apache Module mod_deflate — for Apache 2.2.[src] mod_deflate Compression Level Test — File size Vs.[src] server load - tested with Apache 2.2.[src]
28 sentences · 28 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Mod deflate." encyclopegia.org, 2025, https://encyclopegia.org/wiki/mod-deflate. Accessed 04 December 2026.
Chicago
"Mod deflate." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/mod-deflate.
APA
encyclopegia.org. (2025). Mod deflate. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/mod-deflate
Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON