RARLab Settles a Bet

As a follow up the previous conversation, Eugene from RarLab sent us an email that sets the record very, very straight:

RAR performs data analysis and if it notices that input data
are waveform like, it switches to audio compression algorithm.
Also it may switch back to general compression at any point of a file,
if data type is changed.

Audio compression algorithm predicts the value of every next byte
basing on few previous bytes. The prediction formula is:

NextChar=B0+K1*(B0-B1)+K2*((B0-B1)-(B1-B2))+K3*((B1-B2)-(B2-B3))+
K4*ChannelDelta;

where B0,B1,B2,B3 – preceding bytes;
K1,K2,K3,K4 – coefficients, which are adaptive and changed
during compression;
ChannelDelta – difference between channels;

After calculating NextChar value, the real byte value is subtracted
from the predicted and the result is placed to buffer. When the buffer
is full, it is compressed by Huffman coder.

Ian of sd.cx (who discussed VOCALOID here) pointed us to a good (if slightly crufty) analysis which is quick to write off RAR as performing worse (“with a few exceptions”) than the other specialized compressors. As far as I can tell the “few exceptions” are rock and pop music.

One thought on “RARLab Settles a Bet

  1. nil

    Wow. Interesting. If I can ever muster the motivation, I may have to have a go at a comparison myself. As I archive my own “masters” as WAVS on CD-R, I never really bothered much with audio compression other than MP3/Vorbis.

    Also, that sd.cx entry is just a “my, that sounds creepy” kind of thing. Perhaps if I get my paws on a trial version someday…

Comments are closed.