Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site utah-gr.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hao!
noao!arizona!utah-cs!utah-gr!thomas
From: tho...@utah-gr.UUCP
Newsgroups: net.sources
Subject: File compression utility
Message-ID: <1131@utah-gr.UUCP>
Date: Thu, 5-Jul-84 05:23:03 EDT
Article-I.D.: utah-gr.1131
Posted: Thu Jul  5 05:23:03 1984
Date-Received: Sat, 7-Jul-84 02:48:05 EDT
Organization: Univ of Utah CS Dept
Lines: 690

: So you can just pipe this message into sh :
cat <<'EOF' >README

Well, with all this discussion about file compression (for news batching
in particular) going around, I decided to implement the text compression
algorithm described in the June Computer magazine.  The author claimed
blinding speed and good compression ratios.  It's certainly faster than
compact (but, then, what wouldn't be), but it's also the same speed as
pack, and gets better compression than both of them.  On 350K bytes of
unix-wizards, compact took about 8 minutes of CPU, pack took about 80
seconds, and compress (herein) also took 80 seconds.  But, compact and
pack got about 30% compression, whereas compress got over 50%.  So, I
decided I had something, and that others might be interested, too.

As is probably true of compact and pack (although I haven't checked),
the byte order within a word is probably relevant here, but as long as
you stay on a single machine type, you should be ok.  (Can anybody
elucidate on this?)  There are a couple of asm's in the code (extv and
insv instructions), so anyone porting it to another machine will have to
deal with this anyway (and could probably make it compatible with Vax
byte order at the same time).  Anyway, I've linted the code (both with
and without -p), so it should run elsewhere.  Note the longs in the
code, you can take these out if you reduce BITS to <= 15.

Have fun, and as always, if you make good enhancements, or bug fixes,
I'd like to see them.

=Spencer (thomas@utah-20, {harpo,hplabs,arizona}!utah-cs!thomas)
Code