s-o-1036 June 1994
[< Prev]
[TOC] [ Next >]
8.2. Encoded Batches
When transmitting news, especially over communications links
that are slow or are billed by the bit, it is often desir-
able to batch news and apply data compression to the
batches. Transmission links sending compressed batches
SHOULD use out-of-band means of communication to specify the
compression algorithm being used. If there is no way to
send out-of-band information along with a batch, the follow-
ing encapsulation for a compressed batch MAY be used:
ec-batch = "#! " compression-keyword eol compressed-batch
compression-keyword = "cunbatch"
A line containing a keyword indicating the type of compres-
sion is followed by the compressed batch. The only truly
widespread compression keyword at present is "cunbatch",
indicating compression using the widely-distributed "com-
press" program. Other compression keywords MAY be used by
mutual agreement between the hosts involved.
INTERNET DRAFT to be NEWS sec. 8.2
NOTE: An encapsulated compressed batch is NOT, in
general, a text file, despite having an initial
text line. This combination of text and non-text
data is often awkward to handle; for example,
standard decompression programs cannot be used
without first stripping off the initial line, and
that in turn is painful to do because many text-
handling tools that are superficially suited to
the job do not cope well with non-text data.
Hence the recommendation that out-of-band communi-
cation be used instead when possible.
NOTE: For UUCP transmission, where a batch is typ-
ically transmitted by invoking the remote command
"rnews" with the batch as its input stream, a
plausible out-of-band method for indicating a com-
pression type would be to give a compression key-
word in an option to "rnews", perhaps in the form:
rnews -d decompressor
where "decompressor" is the name of a decompres-
sion program (e.g. "uncompress" for a batch com-
pressed with "compress" or "gunzip" for a batch
compressed with "gzip"). How this decompression
program is located and invoked by the receiving
relayer is implementation-specific.
NOTE: See the notes in section 8.1 on the inadvis-
ability of feeding batches directly to command
interpreters.
NOTE: There is exactly one blank between "#!" and
the compression keyword, and the EOL immediately
follows the keyword.
[< Prev]
[TOC] [ Next >]
#Diff to first older