Uncompressing documents within the server may sound strange to you
initially. Here's an example why 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 built and
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 <hmo@sep.hamburg.com>

03 March 1999	initial release
