{{Short description|Extension Module}} {{DISPLAYTITLE:mod_gzip}} '''mod_gzip''' is an external extension module for the Apache HTTP Server v1 and v2.
It allows using the Gzip compression method for a significant reduction of the volume of web page content served over the HTTP protocol.
mod_gzip can be compiled into Apache as either a static or dynamic module.
==Compatibility== It is possible to check a server to see if it is sending out compressed data, and compression compatibility of a browser for example [http://www.whatsmyip.org/http_compression/ here].
When textual content is 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
One of the earliest Apache 1.3 versions introduced some internal function for regular expression evaluation. This function is used by mod_gzip (for evaluating the filter rules), therefore mod_gzip would not work together with Apache 1.2.x or earlier versions.<ref>[http://schroepl.net/projekte/mod_gzip/versions.htm mod_gzip requires Apache 1.3+]</ref>
Compatibility between Apache 1.3.x and mod_gzip 1.3.y is granted in general: the Apache 1.3 API doesn't change any more, mod_gzip would even work together with very old Apache 1.3 versions.
==Some alternatives== The mod_deflate module is similar to mod_gzip, but usable only with Apache v2. Early versions of mod_deflate provided lesser amount of compression than mod_gzip.<ref>[http://newestindustry.org/2006/10/03/compressing-web-output-using-mod_deflate-and-apache-20x-2/ Comparison of mod_deflate and mod_gzip]</ref> Starting with Apache 2.0.45, the compression level of mod_deflate is configurable using the ''DeflateCompressionLevel'' directive, so this difference disappeared.
A mod_gz module was independently developed by Ian Holsman. This module implements a gzip compression ''filter'' for Apache 2.0, providing similar functionality to mod_gzip. 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.
In PHP similar effect achievable for the output of PHP scripts with: * the [http://php.net/manual/en/function.ob-gzhandler.php ob_gzhandler()] and the [http://php.net/manual/en/function.gzencode.php gzencode()] functions; * zlib.output_compression option in the php.ini file.
CherryPy offers the ''Gzip filter'',<ref>{{Cite web |url=http://www.cherrypy.org/wiki/GzipFilter |title=CherryPy offers the Gzip filter |access-date=2009-10-11 |archive-url=https://web.archive.org/web/20050212003622/http://www.cherrypy.org/wiki/GzipFilter |archive-date=2005-02-12 |url-status=dead }}</ref> which uses the [https://web.archive.org/web/20100225005805/http://www.python.org/doc/2.5.2/lib/module-zlib.html zlib module] of Python standard library.
==License==
The mod_gzip module licensed with Apache License.
==History== Module level content compression for Apache started with mod_gzip, written by Kevin Kiley and Konstantin Balashow<ref>{{Cite web|url=http://www.webreference.com/interviews/petercranstone2.html|title=WebReference Featured Interview|last=Cranstone|first=Peter|date=2000-10-17|website=www.webreference.com|access-date=2017-07-02}}</ref> in autumn 2000, documented by Michael Schröpl,<ref>{{Cite web |url=http://www.linuxplanet.com/linuxplanet/tutorials/5461/2/ |title=mod_gzip written by Michael Schröpl |access-date=2009-10-11 |archive-date=2008-09-17 |archive-url=https://web.archive.org/web/20080917014155/http://www.linuxplanet.com/linuxplanet/tutorials/5461/2/ |url-status=dead }}</ref><ref>[http://schroepl.net/projekte/mod_gzip/ mod_gzip written in autumn 2000]</ref> published by [http://remotecommunications.com Remote Communications Inc.] (RCI).<ref>[http://schroepl.net/projekte/mod_gzip/ RCI had originally published mod_gzip]</ref> RCI was purchased by HyperSpace Communications, RCI released the code into the public domain.<ref>[http://www.webreference.com/internet/software/servers/http/compression/2.html RCI released the code into the public domain]</ref>
The developers of the Apache 2.0.x servers have included the mod_deflate module in the codebase for the server to perform a similar GZIP-encoding function. mod_gzip remained external extension module.
==See also== {{Portal|Free and open-source software}} * mod_deflate * HTTP compression * Some general purpose Apache modules * Some programming language interfaces for Apache
==External links== * [http://www.schroepl.net/projekte/mod_gzip/ Original homepage] of mod_gzip. * Starting with version 1.3.19.2a mod_gzip has found a [https://sourceforge.net/projects/mod-gzip/ new home] on SourceForge.
==Notes== {{Reflist}}
Category:Web server software Category:Articles with underscores in the title Category:Apache httpd modules