Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!rdsunx!davidsen From: davidsen@rdsunx.crd.GE.COM (William E Davidsen) Newsgroups: comp.compression Subject: Re: Sound compression Keywords: sound compression Message-ID: <19524@crdgw1.crd.ge.com> Date: 14 May 91 19:22:59 GMT References: <16198@helios.TAMU.EDU> Sender: news@crdgw1.crd.ge.com Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: GE Corporate R&D Center, Schenectady NY Lines: 19 In article <16198@helios.TAMU.EDU>, n277cb@tamuts.tamu.edu (Todd Gruben) writes: |> |> Does anyone know of a good "lossy" sound compression algorithm which I can |> integrate into a "C" program? I did some 14 => 8 bit compression which worked pretty well, by using the top three bits of the byte for a shift count to shift the highest 1 bit into the high order bit, dropping the high one bit, and putting the next five bits in the low part of the byte. Thus full dynamic range and six bit accuracy (well, almost) and the output was as compressible as the original. Lossy for sure, but it sounded pretty good when uncompressed. Sorry I don't have source any more, but the way to quickly find the high one bit (on a 2's complement machine) is: h1bit = n & (-n)