english | russian
comparison
Many lossless comparisons look at only compression ratio and speed. FLAC decoding is the fastest among lossless codecs and it has the fastest encoding mode. FLAC's compression is within 3% of even the most complex codecs. Note that the compression ratios of all lossless codecs fall in a quite narrow range; the difference between the very best and very worst is only around 7%, and only 4% for the practical codecs.
So the evaluation of lossless codecs typically depends mainly on other features, which is what our first table shows; features like how well it is supported in devices and software, licensing, etc. Additionally, as archiving is one of the main applications for a lossless codec, of chief importance is the ability to use and recover data in the future. FLAC stands out as the most widely supported codec, and the only codec that at once is non-proprietary, is unencumbered by patents, has an open-source reference implementation, has a well documented format and API, and has several other independent implementations.
The rest of the tables show in detail the compression ratios and speed of the codecs in different modes. FLAC's high decoding speed is due to very low complexity and is instrumental to its support by dozens of consumer electronic devices.
(Note: this comparison leaves out some archaic or impractical codecs; see below for some other comparisons.)
Reviewed encoders (besides flac of course):

- Apple Lossless - A proprietary codec by Apple.
- Bonk - An open-source source codec. No player or library support yet.
- La - A closed source symmetric adaptive codec. Highest compression ratio but extremely slow.
- Monkey's Audio - A symmetric adaptive codec with good compression. Source is available under a non-OSI license.
- Ogg Squish - An open source source codec that is no longer maintained.
- optimFROG - A closed source, Windows/Linux codec, with Winamp and XMMS plugins. Slow but high compression ratios.
- Shorten - A.J. Robinson's well-known codec; source is available here.
- Tak - A new and efficient codec, but closed-source and Windows only.
- WavPack - A fine open-source codec, released under the BSD license.

Codec | Source Available? | Player Support? | Hardware Support? | License Cost | OS support
flac v1.2.1 | YES (OSI approved license) | YES (XMMS, Winamp, AlsaPlayer, Y! Music Engine, MacAmp Lite, dBpowerAMP, Foobar2000, QCD, Apollo, many more) | YES (Squeezebox, Sonos, PhatBox, Kenwood MusicKeg, iAudio, ReQuest, Olive, Escient, TrekStor, dozens more) | NONE | Linux, Windows, Mac OS X, *BSD, Solaris, OS/2, BeOS, Amiga OS, others
WavPack v4.41 | YES (OSI approved license) | YES (Winamp, foobar2000, dBpowerAMP, more) | maybe (some portables via Rockbox firmware replacement) | NONE | Linux, Windows, Mac OS X, *BSD, Solaris, others

Shorten v3.2 | YES (non-OSI license) | YES (Winamp, XMMS) | maybe (some portables via Rockbox firmware replacement) | non- commercial only | Linux, Windows, Mac OS 9, Mac OS X, *BSD, Solaris, others
Monkey's Audio v3.99 | YES (non-OSI license) | YES (Winamp, MediaJukebox, dBpowerAMP, more) | no | ? | Windows, Linux console source
Apple Lossless | no | YES (iTunes) | YES (iPod only) | unavailable | Windows, Mac OS X
Ogg Squish 0.98 | YES (OSI approved license) | no (?) | no | NONE | Linux, Windows, other UNIX
Bonk 0.5 | YES (OSI approved license) | YES (XMMS) | no | ? | Linux, Windows, other UNIX
optimFROG 4.21 | no | YES (Winamp, XMMS) | no | ? | Windows, Linux
La 0.3c | no | YES (Winamp, XMMS) | no | ? | Windows, Linux
Tak 1.0 | no | no | no | free for non-commercial use | Windows

The machine used for encoding the test files is a PII-333 with 256 megs of RAM, running Windows NT 4.0 SP5. Unfortunately, though flac runs just about everywhere, Windows is the lowest-common-denominator platform for all the encoders. Apple Lossless was tested on a newer machine (P4-2.4GHz Windows 2000); only the overall encoding and decoding times are shown, and the times are scaled to the PII-333 by multiplying by the ratio of flac times on the PII to P4.
By default when processing files, flac computes the MD5 sum while encoding and decoding. Since MD5 sums are not typically used in playback, and since most codecs either do not support MD5 sums or do not compute them by default, to make the comparison as accurate as possible MD5 checking was disabled for FLAC decoding. However since it is currently not possible to disable MD5 computation for FLAC encoding, the FLAC encoding times here are 4-15% longer than they would be without MD5 checking.
The audio corpus currently consists entirely of CD music tracks. In the future it may include more kinds of input (like speech, other sample rates/resolutions, etc). There are 14 tracks whose genres range from rock to pop to death metal to classical to chant.
Here is a summary table of results on the whole corpus, using just the most 'economic' modes (the ones that give the most compression for the least amount of encode/decode time) for each codec. The table is ordered by the average track compression ratio, which is the average of the ratios for each track; this keeps long tracks from having more influence than short ones. Clicking the column header links will take you to complete tables ordered by that column.
Shown in white, flac in its default mode is right in the middle with respect to compression, relatively fast on the encoding range, and the fastest decoding. This is about what you would expect; FLAC is designed to put most of the processing on the encoding side, which is only done once, whereas the adaptive codecs take as long to decode as encode. FLAC is more suited in this way for playback on low-power devices, borne out by the many hardware devices which support it.

| Encode time | Decode time | Compression
Codec | Total | CPU | Total | CPU | Size | Avg.ratio
Tak 1.01 (normal) | 11:42.59 | 8:12.00 | 6:36.47 | 3:38.14 | 391.16 MB | 51.39%
Monkey's Audio 3.99 (normal) | 13:20.15 | 9:56.40 | 14:24.02 | 11:33.71 | 393.17 MB | 51.97%
optimFROG 4.21 (mode 0 @ 4x) | 16:36.98 | 12:51.58 | 17:55.55 | 14:58.99 | 394.69 MB | 52.24%
Tak 1.01 (turbo) | 7:25.21 | 3:51.02 | 6:16.82 | 3:10.87 | 399.97 MB | 52.71%
WavPack 4.41 (high) | 11:48.47 | 7:45.58 | 9:19.07 | 6:05.35 | 399.90 MB | 52.73%
Monkey's Audio 3.99 (fast) | 10:24.29 | 6:58.46 | 11:32.07 | 8:37.81 | 400.57 MB | 53.11%
WavPack 4.41 (normal) | 9:48.59 | 5:46.91 | 7:37.26 | 4:30.11 | 405.84 MB | 53.56%
FLAC 1.2.1 (-5, default) | 10:07.41 | 6:35.68 | 5:23.16 | 2:22.41 | 406.25 MB | 53.67%
FLAC 1.2.1 (-3) | 7:23.77 | 3:47.42 | 5:31.15 | 2:19.07 | 412.42 MB | 54.57%
WavPack 4.41 (fast) | 8:52.27 | 4:47.74 | 6:33.73 | 3:28.19 | 415.05 MB | 54.92%
Apple Lossless (iTunes 4.5) | 19:53.27 | 19:53.27 | 10:01.86 | 10:01.86 | 414.45 MB | 54.96%
Bonk 0.5 | 51:45.58 | 48:32.10 | 42:02.76 | 39:05.43 | 418.65 MB | 55.43%
FLAC 1.2.1 (-1) | 6:24.51 | 2:42.93 | 5:26.87 | 2:17.49 | 431.72 MB | 56.97%
Shorten 3.2a (-p0 -b256, default) | 10:01.38 | 6:23.40 | 6:38.43 | 3:30.66 | 433.56 MB | 57.29%
RIFF WAVE | 73:44.94 |  | 73:44.94 |  | 780.56 MB | 100.00%

Here are links to the full summary table (all codecs, all modes) and tables for each individual track. The individual track tables are sorted only by compression ratio since the relative encoding and decoding times are the same as for the whole corpus.
Complete summary table
Frederic Chopin Prelude No.24 in d minor
Dream Theater 6:00
Eddie Warner Titus
Maurice Ravel Fanfare from "L'eventail de Jeanne"
Gloria Estefan Conga
Alanis Morissette Hand In My Pocket
L. Subramaniam Raga Sivapriya
The Benedictine Monks of Santo Domingo de Silos Laetatus Sum
Cannibal Corpse Mummified In Barbed Wire
Sergei Prokofiev Piano Concerto No.3 (3rd movement)
Maurice Ravel String Quartet (4th movement)
Domenico Scarlatti Sonata K.42 (arr.Yepes for guitar)
Tool Forty-six & 2
Cream White Room

Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson |  |  |