Uncompressing documents in the server may sound strange initially.
Here's an example where it may be useful for Apache: Cisco's
documentation CD delivers HTML documents in compressed form in order
to make the complete documentation fit on one CD. A significant
amount of documents is quite large (some hundred kBytes) so that
compression really saves space. Cisco also delivers a specialized
HTTP server that includes on-the-fly decompression of the files (and
also search functionality). This module emulates decompression for
Apache.

The idea is this: Since the CD adheres the 8+3 filename convention,
all compressed HTML files end with type ".htm". Thus it is possible
to pipe these files through a dedicated handler and uncompress them
on the fly:

	AddType text/html .htm
	AddHandler send-gunzipped .htm

Apache must be linked against the zlib compression/decompression
library available on many public ftp servers. The zlib homepage is
http://www.cdrom.com/pub/infozip/zlib/. This module has been tested
against version 1.1.3. To enable linking against zlib, you must
specify the library as an extra option to configure:

	LIBS="-lz" ./configure --add-module=PATH/mod_gunzip.c

It is possible to make this a shared object (--enable-shared=gunzip),
but that requires that the zlib is a shared object on your platform
as well. If this is not the case, this (to-be-shared) module would
need to be linked against the (non-shared) zlib.a so that all
references into zlib are already resolved upon link-time. However the
APACI configuration mechanisms don't support this approach yet; all
extra libraries are linked with the httpd image. Consequently this
module can only be a shared object if the zlib itself is a shared
object.

Written and copyrighted by Helge Oldach <mod_gunzip@oldach.net>

03 March 1999	initial release
04 June 2000	Don't gunzip if "Accept-Encoding: gzip" is set.
		Don't display "Content-Encoding: gzip" if unzipping.
		Provide some more logging.
		(Patch provided by Jari Korva <jpkorva@iki.fi>.)
05 June 2000	Provide "Last-Modified" and "ETag" headers.
29 July 2002	Remove ourselves as the default handler.
