From uucp Thu Jan 31 01:16 EST 1985
>From hou3c.UUCP!ka  Wed Jan 30 19:16:55 1985 remote from cbosgd
Date: Wed, 30 Jan 85 19:16:55 est
From: cbosgd!hou3c.UUCP!ka
Message-Id: <8501310016.AA24004@cbosgd.ATT.UUCP>
Received: by cbosgd.ATT.UUCP (4.12/3.7)
	id AA24004; Wed, 30 Jan 85 19:16:55 est
Sent-By: hou3c.UUCP Wed Jan 30 18:47 EST 1985
To: cbosgd!plus5.UUCP!hokey
Subject: Re: Xfernews
Status: RO

I am sending you the source to xfernews in a tar file.  I have included
everything, so here is a roadmap to sort out the pieces.  The directory
dist contains the contents of the last distribution to the net.  That
version does not support batching.

The rest of the code is the newer version.  Brecvnews is a version of
recvnews that will perform unbatching.  (It also works on unbatched
connections.)  Bsendnews is the batching version of sendnews.  There
is also a sendnews for people who don't want to do batching, but it
may be that changes to common.h will keep it from working.

The code is set up to allow a variety of batching formats to be used.
Sendnews.c is linked to mkbat_a.c or mkbat_b.c to form bsendnewsa or
bsendnewsb.  Brecvnews looks at the first character of the batch file
to decide whether to invoke unbat_a or unbat_b, which should be in-
stalled in /usr/lib/news.  This way new batch formats should be easy
to add if necessary.

The two current batch formats are 'a' and 'b'.  The 'a' (ascii) format
is a simple batching format, but since it doesn't perform compression
the gains over transferring each article individually are limited.  (I
estimate that it reduces connect time by about 15%.)  The 'b' format
does compression.  It uses huffman encoding for the bodies of articles
and gives specialized handling to article headers.  Because hoffman
encoding is less effective than the algorithm used by the compress
program recently posted to the net, you may want to discard this code.
The files pack.h, pack.ph, and mkpack* are all part of this scheme.
Note, however, that huffman encoding seems to be faster than compress
by a factor of about 2.

Now that batching is available, the only advantage to running without
using batching is that running with batching allows the files to be
linked rather than copied, which is helpful on disk systems which are
tight on space.  However, this mode provides no protection against
files being truncated by uucp when you run out of disk space.  As
far as I know, all versions of uucp will check for out of disk space
conditions *if* the xfernews spool directory is in the same file system
as /usr/spool/uucp.  Batch files include a length so that truncation
can be checked for explicitly rather than relying on uucp to transfer
the stuff correctly.

Let me know if you have any problems.  I'm almost tempted to work on
this code myself, but I expect that I will shortly begin receiving
bug reports on the new vnews release.
				Kenneth Almquist


