#############################################
# Readme for compression patches for Diablo #
#############################################

This patch allows Diablo to compress and decompress on the fly for
streaming NNTP feeds.  It also includes a small fix for outgoing
statistics in dnewslink done by Terry Kennedy.

Please direct questions/comments/bug reports/flames to
news@maxwell.syr.edu.

To build diablo with compression features
-----------------------------------------

1. copy the patch into the diablo directory (this patch applies to diablo
1.14)

2. apply the patch

3. download, build, and install zlib (it is included with FreeBSD, other
less fortunate folks should check out http://www.cdrom.com/pub/infozip/zlib/)

4. run "xmake clean"

5. run "xmake"

Install the new executables from dbin to /news/dbin (or whatever local
directory you've installed diablo in).

To enable compression for outgoing feeds, add a compress tag to the
options field for the site in dnntpspool.ctl.  An entry might look like
this:

moxy            10.0.0.2                 20 n4 compress

Incoming feeds will negotiate compression with a "mode compress".


Notes on compression.
---------------------

You can expect compression ranging from about 27-32% on full feeds.  Feeds
excluding binaries should see 40-50% compression.  Compression statistics
are reported in the log files along with other stats.  Compression does
eat CPU.  I would advise turning on compression for one feed at a time to
measure impact on your server.  One full (no refused articles) feed will
use about 50-60% of a Pentium 200 when feeding a batch over a local
network.

Only the forward stream is compressed, responses from the remote site are
sent back normally (uncompressed).

Currently, this compression is implemented in Diablo 1.14 and NNTPRelay
version 1.1b4 or later.  I have started work on a generic decompression
daemon to allow for feeding leaf-node INN sites, but this is starving for
lack of time right now.

Credits
-------

Special thanks and credit to Terry Kennedy (TERRY@spcvxa.spc.edu) for
helping test, debug, and for sending patches.

Kudos to Matt Dillon for Diablo.  Clean code makes for easy hacking :)

Copyright information (aka legal nonsense)
------------------------------------------

Modified 12/4/1997 to include support for compressed data streams.
Modifications (c) 1997, Christopher M Sedore, All Rights Reserved.
Modifications may be distributed freely as long as this copyright
notice is included without modification.

