Shorten v1.22 - A Compressor for Sampled Waveform One of the most uncompressible data type is sampled audio files such as 8SVX IFF files, audio modules & such things. This is due to the nature of the data being stored, the most difficult data to be compressed is random data as there are virtually no repeated patterns in it. Every sampled data contains a very high amount of noise which gets represented as random values, hence the difficulty of compressing sampled audio files. This program uses a special prediction algorithm to predeterminate how the waveform will evolve and then a specially tailored huffman algorithm to compress the residuals. The compression so achieved can reach 2:1 ratio, which is far better than that of general purpose compessors as PKZIP, LHA, etc... This software is a port to amiga of original shorten v1.22 written by Tony Robinson, the porting required only rewriting small portions of code, just to be sure the data would get considered as it should have been in the original idea. The code was already very portable. Most of the work was done to make it compile with SAS/C v6.55 (some functions were missing and I had to rewrite them) but the version distributed here has been compiled with GCC, as it proved to be MUCH faster! :) I started rewriting some pieces of code in optimized ASM code, but I decided I would release this version (which is working quite nicely already) in order to see how many people were interested in this piece of software. IF I WILL GET ENOUGH DEMAND, I might provide a MUCH faster version of this, and even a xpk library containing optimized code. This port of this piece of software is E-Mail-Ware, this is a new conception of freeware: if you use it, and if you have access to a place where you can send E-Mail, send me a mail, telling me what you like and dis-like about this. (even just 'I am using it' will suffice) EXECUTABLE VERSIONS!!!! There are three versions of shorten provided: shorten000 -> vanilla 68000 shorten020 -> 68020/68030 shorten881 -> optimized for 68040, works also on any other 020/030 equiipped with a math co-processor. (I tested that the difference of performance with the version specifically optimized for 68881 was barely measurable!) Choose the one which better suits your working place! BEWARE! THE USE OF SOME OPTIONS CAN INVOLVE LARGE UTILIZATION OF FLOATING POINT OPERATIONS! THIS PROGRAM REALLY PREFERS WORKING ON A MATH COPROCESSOR EQUIPPED COMPUTER. USAGE!!!! Now on the usage: first of all READ THE ORIGINAL DOCS! :) While testing the program I discovered that the most interesting option is -p : this changes the function that calculated the predictor values. The higher the parameter you give to -p, smaller will be the range of the residuals, better will behave the final huffman compression step. (giving a too high parameter will anyway only make you loose time while waiting the program to finish.) I found a value of "-p 5" to be adequate to usual needs! ALWAYS REMEMBER that amiga samples are of type MONO 8 BIT SIGNED! thus always use the option "-t s8", unless you know what you are doing. (the usual command line I used was 'shorten -t s8 -p5 pippo' to compress and shorten -x pippo.shn to decompress) HAVE FUN! Gianluca Marcoccia, CS student, University of Pisa, Italy