home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
k
/
kboom11.zip
/
KBOOM11.DOC
< prev
next >
Wrap
Text File
|
1993-01-08
|
4KB
|
89 lines
KBOOM11.EXE
LZW file encoder/decoder
1992 - Miles Pawski
Written in MASM 6.0
CIS - 70473,527
THIS PROGRAM IS FREE
This program is a basic reworking (in Assembler) of James Storer's
SQUEEZE program, which was written in PASCAL and is found in the back
of his book: DATA COMPRESSION, METHODS AND THEORY, 1988 - Computer Science
Press.
In Mr. Storer's original program, he uses an LRU (Least Recently Used)
Queue in order to determine which leaves/nodes of the tree to delete.
SQUEEZE and KBOOM11 (couldn't think of a better name and I really don't
care) are basically LZW dynamic dictionary programs. In my code, I have
eliminated the LRU Queue since it really didn't provide any better
compression, especially on larger files. I have tried using LFU (Least
Frequently Used) routines but these didn't do any better. I had
complicated code to keep track of the frequency of the node use, but it
really didn't do any better. I finally settled for the deletion of the
oldest leaf (without children) which seems to work better than the rest.
Clear Codes are NOT used by this routine. When the tree becomes full,
the oldest leaves (without children) are deleted one-by-one on a needed
basis. Leaves are checked for the presence of children so that the
children and their siblings aren't stranded and the information contained in
those nodes are not wasted.
This program is very fast and provides excellent compression. Various
combinations of the DICTIONARY size, MAXINCREMENT factor, and MAXMATCH
are possible. MAXINCREMENT of 1 indicates the FC (First Character)
mode. PLEASE SEE MR. STORER'S ABOVE MENTIONED BOOK. With FC, only the
first character of the current match is updated to the tree. AP - all
prefixes indicates that MAXINCREMENT of the current match will be added
to the tree. What seemes to work best are the combinations:
DICTIONARY 4096
MAXINCREMENT 1
MAXMATCH 100
(The above is faster but the compression is not as good as the
following:)
DICTIONARY 8192
MAXINCREMENT 4
MAXMATCH 100
If you have MASM 6.0, you can change around the combinations and re-assemble.
You can easily adapt the code to external uses as object modules, etc.
The following files are contained in this .ZIP:
KBOOM11.EXE
KBOOM11.ASM
KBOOM11.DOC
Kboom11's compression gets better with larger files. It is not meant as
a replacement for anything. It compresses better than ARC but not as good
as PKZIP's imploding method although it comes close. It is fast and very
usable.
Certain parts of KBOOM11 could be rewritten with 386 code to make it even
faster. This was written in 8086 code. The code is completely self-
contained and no external modules are used or provided. Many macros are
used for SPEED.
You really should read Mr. Storer's book: DATA COMPRESSION, METHODS AND
THEORY. It is almost decipherable to non-mathematicians (like me).
USAGE: KBOOM11 [input file name] [output file name] [/c][/d][/n]
/c - compress file
/d - decompress file
/n - omit the logo
Advanced error checking is not contained in this code. If a file name
or path does not exist, it will indicate "error". I use it under DOS 5.0
although I'm sure it will work under anything above DOS 3.3. I don't really
know. This program will only decompress programs compressed by KBOOM11.
KB00M11 is FREE.
-- Miles Pawski --