Reply To: Lossless streaming?

March 19, 2023 at 10:05 pm #5526
James Johnston

    FLAC uses, last I saw, an adaptive LPC system, which is not at all a bad choice, with the error signal integerized then compressed via information-theoretic approach to make it lossless.

    The trick in FLAC (and any other lossless encoder) is to make the code give invariant results across a wide variety of platforms.

    I think FLAC uses Arithmetic coding, but I could be wrong, it maybe LZW or a derivative. I knew the answer to this once.

    As an aside, it is not hard to determine the entropy of a given signal when it is being predicted in given length blocks. The Spectral Flatness Measure provides this information. It is ‘1’ for a flat (ergo unpredictable, i.e. full entropy) signal, and is always in practice considerably smaller than ‘1’.

    The SFM is calculated by taking the ratio of the geometric mean and arithmetic mean of the power spectrum.  The number you get is for absolutely PERFECT prediction, matched perfectly to that block of signal. Needless to say, that’s a bound you’ll never reach.