Skip to content

Commit

Permalink
ncompress - (Ver. 4.2.3) an improved file compressor
Browse files Browse the repository at this point in the history
This is version 4.2 of (N)compress (an improved version of compress 4.1).

Compress is a fast, simple LZW file compressor.  Compress does not have
the highest compression rate, but it is one of the fastest programs to
compress data.  Compress is the defacto standard in the UNIX community
for compressing files.

'build' is a menu driven shell script for compiling, testing and
installing (N)compress. So to build and install (N)compress all you have to
do is run build.  Build will first test your system for default
settings. The current compile settings are stored in a special file
called compress.def.

For user with problems with build there is a default makefile included
called 'Makefile.def'. Also build is capable te generate a Makefile with
all options (option genmake).

(N)compress 4.2 has a special, fast compression hash algorithm.  This
algorithm uses more memory than the old hash table. If you don't want
the faster hash table algorithm set 'Memory free for compress' below
800000.

zcmp, zdiff, zmore were copied from version 4.1 without any changes.

The output of (N)compress 4.2 is fully compatible with that of compress 3.0.
In other words, the output of (N)compress 4.2 may be fed into uncompress 3.0 or
the output of compress 3.0 may be fed into uncompress 4.2.

The output of (N)compress 4.2 is not compatible with that of
compress 2.0.  However, compress 4.2 still accepts the output of
compress 2.0.  To generate output that is compatible with compress
2.0, use the undocumented "-C" flag.
  • Loading branch information
Peter Jannesen committed Aug 28, 1992
1 parent 1411cb7 commit 4b59db4
Show file tree
Hide file tree
Showing 16 changed files with 3,047 additions and 1,995 deletions.
20 changes: 20 additions & 0 deletions Acknowleds
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Acknowledgments:

(N)compress, Version 4.2

Thanks to the previous authors whom I didn't contact, for making
the program available originally.
Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
Jim McKie (decvax!mcvax!jim)
Steve Davies (decvax!vax135!petsd!peora!srd)
Ken Turkowski (decvax!decwrl!turtlevax!ken)
James A. Woods (decvax!ihnp4!ames!jaw)
Joe Orost (decvax!vax135!petsd!joe)
Dave Mack (csu@alembic.acs.com)

Also thanks to Frans Meulenbroeks, Jan Christiaan van Winkel,
Peter van Hooft and the testers of comp.sources.reveiwed for testing
this version on different platforms.

--
Peter Jannesen
18 changes: 0 additions & 18 deletions Acks

This file was deleted.

30 changes: 29 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
(N)compress cersion 4.2.2
Minor changes after the reviewes from comp.sources.reviewed
o Change the name to ncompress because of version problems.
o Start all scripts with ':'
o Added libary options to buidl script.
o Install zmore zcmp zdiff and manuals.
o Added patchlevel.h
o Updated README file. Created LZW.INFO
o a complete grammatical go-round
o Use utime.h if availble
o Change de default input/output buffer size to BUFSIZ. Because
of performance problems with read a head on systems.
o Build generates a makefile.

compress version 4.2.1 improvements
o Change the name to ncompress because of version problems.
o Completly rewrite of the compress and decompress functions.
compress speedup 25-50% (user cpu time).
decompress speedup 20-30% (user cpu time).
o Add special fast compress hash algorithm.
o Fix some minor things.
o use #include <utime.h> if availble.
o Cleanup the source code (I think so).
o Test if filename is not to long. This is done on runtime no fix length
size any more.
o Powerfull build script (test almost every thing).

Modifications for version 4.1:
o Added -r command line flag to allow recursive compression/
decompression of directory trees. As a side-effect, compress
Expand All @@ -15,13 +42,14 @@ Modifications for version 4.1:
o Removed atob/btoa/tarmail/untarmail - my versions are
based on btoa 5.2 which is not compatible with the atob
included with compress4.0.

Compress version 4.0 improvements:
o compress() speedup (10-50%) by changing division hash to xor
o decompress() speedup (5-10%)
o Memory requirements reduced (3-30%)
o Stack requirements reduced to less than 4kb
o Removed 'Big+Fast' compress code (FBITS) because of compress speedup
o Portability mods for Z8000 and PC/XT (but not zeus 3.2)
o Portability mods for Z8000 and PC/XT (but not zeus 3.2)
o Default to 'quiet' mode
o Unification of 'force' flags
o Manual page overhaul
Expand Down
85 changes: 85 additions & 0 deletions LZW.INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
The following article from James A. Woods, one of the earlier
authors of compress, explains its relationship to the Unisys
patent on the LZW compression method:

From uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!wuarchive!usc!ucsd!ucbvax!agate!riacs!jaw Wed Aug 1 15:06:59 EDT 1990
Article: 1282 of gnu.misc.discuss
Path: alembic!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!wuarchive!usc!ucsd!ucbvax!agate!riacs!jaw
From: jaw@riacs.edu (James A. Woods)
Newsgroups: gnu.misc.discuss
Subject: Sperry patent #4,558,302 does *not* affect 'compress'
Keywords: data compression, algorithm, patent
Message-ID: <1990Jul31.220935.1424@riacs.edu>
Date: 31 Jul 90 22:09:35 GMT
Organization: RIACS, NASA Ames Research Center
Lines: 69

# "The chief defect of Henry King
Was chewing little bits of string."

-- Hilaire Belloc, Cautionary Tales [1907]

As a co-author of 'compress' who has had contact with an attorney for
Unisys (nee Sperry), I would like to relay a very basic admission from Unisys
that noncommercial use of 'compress' is perfectly legal. 'Compress' is also
commercially distributed by AT&T as part of Unix System 5 release 4,
with no further restrictions placed upon the use of the binary, as far
as I am aware.

From conversations with Professor Abraham Lempel and others, it
appears that neither AT&T, Sun Microsystems, Hewlett Packard, nor IBM
are paying any sort of license fees to Unisys in conjunction with patent
#4,558,302. It may be true that some organizations are paying fees for
data compression technology licensed from one or more of the many holders
of compression patents, but this is all independent from 'compress'.

In particular, I received a letter at NASA dated October 1, 1987 from
John B. Sowell of the Unisys law department, informing me for the first
time that some form of LZW was patented. I naturally expressed
skepticism that an algorithm could be patented (a murky legal area
which remains so), stated that 'compress' is not identical to LZW,
and in fact was designed, developed, and distributed before the ink
on the patent was dry. Several telephone conversations later, Mr. Sowell
intimated that they would *not* seek any fees from users of 'compress'
but instead were signing licensees for hardware implementations of LZW.

So, regardless of what you believe about a shady legal area, if anyone
from Unisys contacts you to extract tribute for the use of 'compress', please
tell them that, first, it is not theirs to begin with, and, second, there is
someone who will testify in court about the conversation above.
It is not even clear if anyone can "own" 'compress', since original developer
Spencer Thomas, myself, and others placed the code in the public domain
long before the adoption of the Berne copyright convention.

In light of the events above, it seems that the Free Software
Foundation is being unduly paranoid about the use of 'compress'.
Now I can well believe that FSF is more likely to be a legal target
than a behemoth like AT&T, but if they are simply redistributing
untouched free software developed years ago in the public sector,
I see no problem.

Aside: I am investigating, possibly for a case history to be
recycled to USENET, the particulars of data compression patents.
I am aware of the following patents: IBM's Miller-Wegman LZ variant,
those of Telcor and ACT [losing candidates for the British Telecom modem
standard], James A. Storer's work on limited lookahead as explicated in his
text "Data Compression (methods and theory)", Computer Science Press, 1988,
and the various patents pending associated with the Fiala and Greene
CACM article of April, 1989 on textual substitution methods.
If you have any lore, send it this way.



Sincerely,

James A. Woods
NASA Ames Research Center (RIACS)
jaw@riacs.edu (or ames!jaw)


P.S. The algorithm patent issue certainly is a "topic A" at the moment.
One useful reference is the review article by Anthony and Colwell --
"Litigating the Validity and Infringement of Software Patents" in
Washington and Lee Law Review, volume 41, fall 1984. I know Robert Colwell
personally. As a practicing patent attorney, he tells me that, at a minimum,
use of an invention "for research purposes" is legitimate.
17 changes: 17 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
File Name Archive # Description
-----------------------------------------------------------
Acknowleds 1
Changes 1
Makefile.def 1
MANIFEST 1 This shipping list
LZW.INFO 1
README 1
build 1
compress.1 1
compress42.c 1/2
patchlevel.h 2
zcmp 1
zcmp.1 1
zdiff 1
zmore 1
zmore.1 1
88 changes: 0 additions & 88 deletions Makefile

This file was deleted.

51 changes: 51 additions & 0 deletions Makefile.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Makefile

# C complier
CC=cc

# Install directory for binarys
BINDIR=/usr/local/bin

# Install directory for manual
MANDIR=/usr/local/man/man1

# compiler options:
# options is a collection of:
#
# -DDIRENT=1 Use dirent.h
# -DSYSDIR=1 Use sys/dir.h
# -DLSTAT=1 Use lstat for finding symlinks.
# -DUTIME_H=1 Use utime.h
# -DUSERMEM=<size> Availble memory for compress (default 800k).
# -DREGISTERS=<nbr> Number of registers (default 2).
# -DIBUFSIZ=<size> Input buffer size (default BUFSIZ).
# -DOBUFSIZ=<size> Output buffer size (default BUFSIZ)
# -DBYTEORDER=<order> Byte order (default: unknown).
# -DNOALLIGN=1 Data word allignment (default: yes).
# -DDEF_ERRNO=1 Define error (not defined in errno.h).
# -DMAXSEG_64K=1 -BITS=16 Support segment processsor like 80286.
#
options= -DIRENT=1 -DUSERMEM=800000 -DREGISTERS=3

# libary options
LBOPT=

compress: Makefile compress42.c patchlevel.h
$(CC) -o compress $(options) "-DCOMPILE_DATE=\"`date`\"" compress42.c $(LBOPT)

install: compress
[ -f /usr/local/bin/compress ] && { rm -f /usr/local/bin/compress.old ; mv /usr/local/bin/compress /usr/local/bin/compress.old ; }
rm -f /usr/local/bin/uncompress /usr/local/bin/zcat
cp compress /usr/local/bin/compress
strip /usr/local/bin/compress
rm -f /usr/local/bin/uncompress
ln /usr/local/bin/compress /usr/local/bin/uncompress
rm -f /usr/local/bin/zcat
ln -f /usr/local/bin/compress /usr/local/bin/zcat
cp zcmp zdiff zmore /usr/local/bin/.
chmod 0755 /usr/local/bin/compress /usr/local/bin/zcmp /usr/local/bin/zdiff /usr/local/bin/zmore
cp compress.1 zcmp.1 zmore.1 /usr/local/man/man1/.
chmod 0644 /usr/local/man/man1/compress.1 /usr/local/man/man1/zcmp.1 /usr/local/man/man1/zmore.1

cleanup:
rm -f compress compress.def comp.log
Loading

0 comments on commit 4b59db4

Please sign in to comment.