As a follow up the previous conversation, Eugene from RarLab sent us an email that sets the record very, very straight:
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:
where B0,B1,B2,B3 – preceding bytes;
K1,K2,K3,K4 – coefficients, which are adaptive and changed
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.