[flac-dev] Flac compression levels?

Erik de Castro Lopo mle+la at mega-nerd.com
Tue Mar 12 04:38:44 PDT 2013


Marcus Johnson wrote:

> So, basically compression levels 1 & 2 result in the same file size, 4-7
> also result in the same file size, now is it just a coincidence,

That is the results for that particular file, a file that was already part
of the FLAC test suite called "noisy-sine.wav".

For another file chosen randomly from my SSD I get:

    Original file size 18345736 bytes.
    Compression level 1, file size 10405054 bytes.
    Compression level 2, file size 10405054 bytes.
    Compression level 3, file size 9409515 bytes.
    Compression level 4, file size 9397416 bytes.
    Compression level 5, file size 9397414 bytes.
    Compression level 6, file size 9397414 bytes.
    Compression level 7, file size 9367585 bytes.
    Compression level 8, file size 9332497 bytes.

For this example, 1 & 2 are still the same, but 4-7 give three different
results.

Whats happening is that each different increasing compression level adds 
a new compression method to the set of compression methods. In the case
where two successive compression levels result in the same output file
size, it means that the added compression method didn't help compressing
that particular file. It may still help the compression of another 
different file.

> considering the test files are small, or should the compression levels be
> rewritten, to something like compression level 1, 2, and 3
> (not corresponding to the current one two and three ofc.)

No, they should stay as they are.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list