[comp.lang.c] Wanted : Disk to Memory Compression Source

NU115247@NDSUVM1.BITNET (09/26/89)

I in the need for a routine that compresses from memory to disk and
vice versa using some type of lz compression.  I'd like to get C or
Turbo C source, but anything is fine.  My biggest concern is expansion
speed over compression speed and compressed size.  I want to be able to
compress a large number of data files and then be able to decompress the
data multiple times without changing (static data).  Can anyone point
me to any sources or FTP sites.  Thanks in advance.
-------
Jeff Cooper                  | Stress:  The confusion created when the
                             |          mind overrides the bodies desire
NU115247 @ NDSUVM1.BITNET    |          to choke the living shit out of
                             |          asshole who desperately needs it.

condict@cs.vu.nl (Michael Condict) (09/27/89)

The compress/uncompress/zcat utility of BSD Unix (and Sun OS) is probably
what you want.  It is based on Lempel-Ziv and was originally written by my
friend Joe Orost.  It is freely distributable, if not completely public
domain.  You needn't worry too much that it is organized as a main program
instead of a function -- I have found that it is so fast in uncompressing
data from a file to memory that if you use popen("zcat file", "r"), you will
often be able to read in a compressed file with less CPU time and less real
time than the equivalent uncompressed file.  (This is based on measurements
for files that were compressed by a factor of 4-to-1 or greater.)  It happens
because the system overhead of reading a file four times larger is greater
than the cost of the uncompression algorithm.

You can get the source for the utility from any BSD source tape, from a USENET
archive or, probably, directly from Joe Orost: vax135!petsd!joe.

Michael Condict		condict@cs.vu.nl
Vrije University
Amsterdam

P.S. Hi, Joe.  I moved from Murray Hill to Vrije U. in September.

bright@Data-IO.COM (Walter Bright) (09/28/89)

In article <2830NU115247@NDSUVM1> NU115247@NDSUVM1.BITNET writes:
<I in the need for a routine that compresses from memory to disk and
<vice versa using some type of lz compression.

The Oct 89 issue of Dr. Dobb's has an article and source code for
lz compression.