From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f569d,138e28acdab743a8,start X-Google-Attributes: gidf569d,public X-Google-Thread: f6126,138e28acdab743a8,start X-Google-Attributes: gidf6126,public X-Google-Thread: 10d4db,138e28acdab743a8,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-08-26 07:28:29 PST Newsgroups: comp.os.linux.announce,comp.compression,comp.multimedia Path: bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!travelers.mail.cornell.edu!cornell!bounce-bounce From: xiphmont@athena.mit.edu (Monty) Subject: Announce: SQUISH lossless/lossy audio compression utility Message-ID: Followup-To: comp.os.linux.misc Keywords: SQUISH Linux sound audio compression Sender: mdw@cs.cornell.edu (Matt Welsh) Reply-To: xiphmont@athena.mit.edu (Monty) Organization: Massachusetts Institute of Technology Date: Fri, 26 Aug 1994 14:02:30 GMT Xref: bga.com comp.os.linux.announce:1157 comp.compression:4372 comp.multimedia:9219 A *beta* release of the SQUISH audio compression/decompression utility is now available via anonymous ftp from DeskFish.mit.edu in the /pub/compression_apps directory. Binaries are available for Linux, Dec Ultrix, RS6k AIX and Sun4. The SQUISH faq is attached below. Please note that the beta release does not yet have the -i -H or -w options enabled. These option will follow in another release shortly; for the moment, however, this means SQUISH is limited to 16 bit raw sample data. Monty ****INCLUDED FILE FOLLOWS**** SQUISH v0.0 Audio Compression Frequently Asked Questions and Propaganda List Last updated: Thu Aug 25 15:46:16 EDT 1994 1) What is SQUISH? SQUISH is a compression package designed to reduce the file size of digitized 8 and 16 bit audio samples (or samples of any periodic data). SQUISH will operate on files sampled at any speed, but it is designed to work with very high quality samples, for example, CD quality samples. 2) Why another compression? There's already GZIP, MPEG, Mulaw, etc... Normal compression utilities such as UNIX 'compress' and 'gzip', and DOS 'PKZIP' are virtually useless for compressing digitized sound files. gzip -9 will usually reduce file size of digitized sound by about 10%. The audio compression formats that already exist each have drawbacks that limit their usefulness in general purpose sound compression. For example, Mulaw is very low quality and usually limited to low sample speeds. MACE is also designed for lower quality samples; MPEG usually only goes to 6:1, and is *only* lossy. Other compression techniques (such as AT&T's recently announced format, the name of which escapes me) are optimized for voice or some other specific kind of sound. SQUISH is designed to compress any sound without sound quality loss at moderately high ratios. A CD quality sample compressed at the highest lossy ratios will take up less than 70% as much space as an 8 bit 8kHz mulaw sample while preserving the entire frequency and dynamic range of a CD. 3) Is SQUISH a lossless compression? SQUISH will work both as a lossy or lossless compression, depending on user selectable command line options. Lossy compression will result in a smaller files than lossless at the expense of sound quality (Lossless settings up to -5 should not produce any audible artifacts or distortion). SQUISH is designed to lose as little information as possible while performing lossy compression. 4) What sound file formats will SQUISH compress? SQUISH requires the sound file to be 8 or 16 bit (signed or unsigned) raw data, sampled at any rate. Input files may be little or big endian (regardless of platform), and can contain up to 256 interleaved channels. 5) Can SQUISH compress any other file types (ie, Mulaw, .WAV, etc.)? Yes. Although SQUISH is designed to compress raw data, the -w option will compress sound files that consist of raw linear data with a short (<50 byte) header, such as most .WAV files. Mulaw files must be converted to linear data before compression. The sound utility SOX was designed expressly for the purpose of conversion and will convert virtually all known file formats to raw data and back. Using SOX is fairly easy (and fast), and constructing a few scripts to run SOX on (for example) an .au file then pipe the output into SQUISH for compression will achieve the desired effect. SOX binaries and source code are freely available from quite a few FTP sites (ie, wuarchive.wustl.edu, sunsite.unc.edu, switch.nic.ch, etc.) If the input file *has* been converted from anything other than another linear format, the -H option should be used in order to alert SQUISH that the input file has fewer discrete input values than a normal 16 bit file. SQUISH will then be able to properly compress out the 'extra' space. 6) How small will files get? Using the -5 option (the default option), files will compress anywhere from minimum of 1.5:1 to 3:1, depending on the type of sound being compressed. Typically, 2:1 can be expected; these ratios are comparable to the ratios that LZW (the format used by PKZIP and gzip) gets on text and binary files. The Eroica Symphony, for example, compressed with a ratio of 2.66:1 lossless when using -5. Lossy compression will always get better ratios than lossless, even using the -10 option. Using the -l10 option, lossy will get between 14:1 and 16:1 depending on the type of sound being compressed. Obviously, samples containing silence will be much smaller. It is safe to assume that SQUISH will almost always be able to deliver 5:1 with no perceptible change in sound quality. 7) How fast is SQUISH? Will it compress realtime? SQUISH must make more than one pass over a sound file in order to compress it; for this reason, it is not suited to realtime compression. SQUISH can decompress in one pass, however, and decompression will be fast enough to occur realtime during playback, once the beta code is optimized. Especially relevant to Linux users, a math coprocessor of some flavor is fairly important; SQUISH does the majority of its work in floating point. The good news is that my 486DX50 outperforms a SPARC IPC and IBM RS6000 320H when running SQUISH. I can't wait to try it on a Pentium :) 7) How does SQUISH work? SQUISH uses a veritable cocktail of compression techniques; both old (huffman trees and RLE, for example) and new variants of older ideas (Bitstreak, MEM, FFT), as well as anything that would make files smaller without introducing (much) distortion or noise. Rumor has it that even the Colonel's Secret Recipe (salt, black pepper, monosodium glutamate) makes a guest appearence in order to give the entire compression package a crispy, yet tasty coating of breading. The compression techniques used by SQUISH are not derived from any work done by MPEG or AT&T (unless signal theory developed at Bell labs in the '30s and '40s is considered). 7) What platforms will SQUISH run on? SQUISH is currently compiled for Linux (i386/486/Pentium), IBM AIX (RS/6000), DEC Ultrix (DECstation), and SUN Solaris (SPARCstation). Programmers who are willing to help port to new platforms are welcome. I already have a volunteer for the PowerMac... 8) Is development continuing? Is SQUISH likely to improve? Yes. The biggest problem with development has been a surplus (not a dearth) of ideas... I had a working package in February, but there was always one more thing to try... Specifically, the following improvements are immediately in the works: 1) The storage of frequency domain impulse amlitudes is not as efficient as it could be; the floating point representation being used 'wastes' zeroes. 2) The algorithm currently used for determining the amount of the audio spectrum currently being used is easily fooled; this results in audible artifacts at high lossy settings, and less than optimal compression ratios at all lossy settings.. A new algorithm is being coded. 3) SQUISH is not terribly memory efficient in terms of time or space; this is not a problem with the algorithms, but the code. As the code is cleaned up, speed and memory requirements should improve. 8) Is SQUISH free? Where do I get it? SQUISH is free just like virtually everything else (originally) for Linux. At the moment, SQUISH lives primarily on my own machine, deskfish.mit.edu, where it is available via anonymous ftp (hopefully it will propogate to popular ftp sites; DeskFish is my development machine, and it doesn't need the load). Binaries for various machines are compiled in the /pub/compression_apps directory. Source will be generally available as soon as I get it cleaned up a bit (once SQUISH goes from Beta to release). Unlimited personal and non-commercial use of SQUISH is encouraged. Commercial use of SQUISH binaries or source code in any form requires formal liscensing arrangements; this includes third-party software that directly includes SQUISH source, or code based on or directly produced from SQUISH source or binaries. Essentially, tainting laws apply. We're all on the honor system here folks, so don't let me down. If in doubt, ask. Monty -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu Be sure to include Keywords: and a short description of your software.