[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HardPressed



In article <201obaINN1ov@jhunix.hcf.jhu.edu> florpch@jhunix.hcf.jhu.edu (Lawrence S Lee) writes:
>I don't own HardPressed, and have heard only a few things about it. What's
>this about "Different" kinds of compression and decompression. Does the
>speed of the de/compression affect how much space you save?

There are four different compression modules that come with HardPressed:
RLE, LZW, LZSS, and adaptive Huffman.

RLE changes "xxxxx" to "5x", so it works well on things with large spans of
zeros (like applications or sparse files), but doesn't do much for ascii
text or word processor documents.  Because it's simple, it's very fast.

LZW is what ShrinkIt uses.  It's slower, but compresses most things reasonably
well.

LZSS is a different sort of compressor.  It takes about 10 times longer to
compress something than it does to expand it, but it expands in half the
time that LZW takes.  It does about as well or better than LZW on most kinds
of files (though LZW seems to have the edge on sparse files).  It's very
useful for things that never change (title screens, sample source code,
program docs, applications, desk accessories/fonts/tools) because you only
have to compress them once.

Adaptive Huffman might be useful for sound files, but that's about it (there's
a "differential" compressor included, and a "differential + AHuff" profile
in the Goodies folder).  We ship the disk with diff and ahuff inactive, so
that they don't actually load unless you turn them on.  It's rather slow.


There are "profiles" that decide what module to use.  There are "Standard",
"Faster with less compression", and "Slower with more compression" profiles,
as well as profiles that let you compress everything with a specific module.
The kind of compression to use is based on the filetype and filename extension
(so a TXT file named "foo" is treated differently from a TXT file called
"foo.shk").  "Faster" and "slower" just use different modules from "Standard"
to get the desired effect.

-- 
fadden@uts.amdahl.com (Andy McFadden)
[ Above opinions are mine, Amdahl has nothing to do with them, etc, etc. ]