audiozip 1.0p2

A GPLed package for zipping audio files a little better


This package performs signed 16bit audio file (un)zipping with a very simple method that allows up to ~40% of disk space (or transfer time) saving with no audio compression. This means that there is no information loss in this process and that the unzipped file will be identical to the original one: audio quality is perfectly preserved. This may be necessary in many musical processing and synthesis applications. The direct application of standard zipping tools (gzip, bzip2, pkzip, compress) leads to much poor results (~15% of disk saving or less).

If highest audio quality is not a concern, compressed formats such as mu-law and A-law or the popular MPEG3 can be used to reduce the disk storage space requirements for an audio file, as well as a lower sampling frequency and/or resolution. The "zipping" rates obtained with these methods are (often much) higher and the process is more fast when not immediate.

The audiozipping method relies on this experimental fact: in many "useful" and "musical" cases, the wave form is in some way "continuous", that is the difference between a sample and the previous one (that is, d(n) = S(n) - S(n-1)) are often small. They're little enough to require less bits than the entire samples to store them, even if the dynamic range of the wave form is large.

So we consider the differences or deltas file. This file is similar to the original one (technically speaking, it is in the same file format but it usually sounds very differently) but the n-th sample S(n) is replaced by the difference d(n) (the first sample is untouched). The previous property means that this file can be zipped with standard variable length encoding methods with much better results than the original one. In this Linux implementation, the audiozip scripts relies on bzip2 or gzip.


The audiozip package is composed by a C program, audiochew, that converts from wave file to differences file and vice versa, and by two shell scripts, audiozip and audiounzip, that automates zipping operations. The user usually calls the shell scripts.

Command line syntax (parameters in square brakets are mandatory):

audiochew {-d | -i} [source] [target]

If -d (as difference, delta or direct transformation) flag or no flag is specified audiochew trasforms the signed 16bit PCM file [source] in the respective deltas' file [target]. If the -i flag is specified audiochew performs the an inverse transformation. audiochew doesn't care about file extensions.

audiozip {--savespace}[audiofile]

audiounzip {--savespace} [audiozipfile]

where [audiofile] is a signed 16bit PCM file and [audiozipfile] is a file previously zipped by audiozip (they have the ".d.bz2" or ".d.gz" extension).

Using the --savespace flag the original file is deleted as soon as possible.

The audiozip script stores a temporary file (with additional extesion '.d') in the working directory.

A comparison between lossless audio file zipping utilities for Linux (including audiozip) can be found here.

audiozip is distributed under GPL and you can have a copy of its sources contacting

Maurizio Umberto Puxeddu


Home