[comp.sys.amiga.tech] Sample Compression methods

a186@mindlink.UUCP (Harvey Taylor) (04/10/90)

    While the subject of Fibonacci Compresssion is in the air, I
 would like to raise the general question of the efficiency of
 various compression methods on sound samples. I noticed recently
 that the usual arc/zip/lharc [ie. Huffman/LZW/Huffman Adaptive LZ]
 do not do very well.

    703811 --> 569751 Arc   Version 0.23        20%
    703811 --> 537403 LHarc Version 1.10        24%
    703811 --> 580145 Zip   Version 1.00        18%

    Is anybody aware of a better algorithm?

 "I thought that some of the metaphysical imagery was really particularly
  effective...which seemed to counterpoint the surrealism of the underlying
                                                        metaphor." -HHGG
      Harvey Taylor      Meta Media Productions
       uunet!van-bc!rsoft!mindlink!Harvey_Taylor
               a186@mindlink.UUCP

jms@tardis.Tymnet.COM (Joe Smith) (04/12/90)

In article <1452@mindlink.UUCP> a186@mindlink.UUCP (Harvey Taylor) writes:
> various compression methods on sound samples. 
> arc=20%, lharc=24%, zip=18%
>    Is anybody aware of a better algorithm?

I overheard someone at BADGE talking about vertical compression.
Sound samples don't usually have repeated bytes.  Even steady tones don't
have repeated patterns of bytes (due to jitter in the LSB).  However,
there are usually a lot of consecutive negative bytes and consecutive
positive bytes.  For example:

	FC 11111100 -4
	FD 11111101 -3
	FE 11111110 -2
	FF 11111111 -1
	00 00000000  0
	01 00000001  1
	02 00000010  2
	03 00000011  3

Looking at the bits column by column instead of row by row, we have:
(previous 8 bytes)	FF FF FF FF FF F0 33 55
(the 8 bytes above)	F0 F0 F0 F0 F0 F0 33 55
(next 8 bytes)		00 00 00 00 00 F0 33 55
That is a pattern that should compress well with LZW.

-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."