home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga ACS 1997 #4
/
amigaacscoverdisc1997-041997.iso
/
w_acs_6'97
/
delitracker_ii
/
files
/
xpksmpl.lzx
/
SMPL.doc
next >
Wrap
Text File
|
1994-01-24
|
4KB
|
92 lines
SMPL
A dynamic huffman with delta precoding
Version 1.0
Copyright 1993 by Jorma Oksanen
License/Disclaimer
------------------
This library may be freely distributed with the XPK compression package,
as long as it is kept in its original, complete, and unmodified form. It
may not be distributed by itself or in a commercial package of any kind
without my written permission.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.
Decription
----------
SMPL is a XPK sublibrary implementing dynamic huffman coding over
variations of datastream. If that sound too complicated, I suggest you
read docs for DLTA and HUFF, in that order. In fact, DLTA was made to be
used as preprocessor for other XPK packers.
Then why did I code SMPL? Think this: how many music programs you know
that support XPK ? Yes, I know I can always use XFH so I can pack all my
data, but if I have first fed data thru DLTA and then another compressor,
then XFH only decompresses the latter. So I still need XPK supporting
program to pack my samples efficiently.
SMPL overcomes this by including DLTA coding into same library. I chose
to use huffman coding for actual packing as it seemed to give best average
compression. I snatched the huffman code from xpkHUFF.library (Copyright
1992 by M.Zimmermann) and tweaked it a bit for faster (de)compression.
So, how well it compresses samples? I took 1.7 MB of samples and ran
them thru several packers. The compression ratios I got:
HUFF 17% DLTA+HUFF 27%
IMPL 21% DLTA+IMPL 23%
NUKE 20% DLTA+NUKE 23%
SHRI 29% DLTA+SHRI 34%
SMPL 30% DLTA+SMPL 25%
From above table you should see why I chose huffman for compression. It
gains most from delta encoding. But if you surely want best compression
ratios regardless of time used then go for DLTA+SHRI.
Some samples were packed better with simple HUFF without delta precoding.
If I find a way to determine output size from frequency table (ie. without
building huffman tree) I will add non-delta packing to SMPL.
I tested DLTA+SMPL mainly to see if there would be any use for recursive
delta, but less than 100K of all data packed marginally better when fed
thru double delta.
Three percent difference between SMPL and DLTA+HUFF comes from two
things:
1) xpkmaster.library adds some bytes to DLTA coded files
2) I store huffman tree in more compact way
Following is a table briefly listing some comparative statistics for
SMPL. These were generated by xBench on the standard XPK benchmark system
(A3000/25 with SCRAM, using the AmigaVision executable as data). Note that
memory needs don't include xpkmaster.library's buffers.
Method Packing Unpacking Packing Unpacking Compression
Memory Memory Speed Speed Ratio
------ ------- --------- ------- --------- -----------
SMPL 14K 7K 151 K/s 354 K/s 6.7%
Version History
---------------
1.00 First public release.
Contact Address
---------------
Jorma Oksanen
Ratastie 5 A 3
14200 TURENKI
FINLAND