5 ms·
Between Brotli and FLIF, which is good enough?
by proyb2 11y ago
Between Brotli and FLIF, which is good enough?
- gillianseed 11y agoBrotli is excellent at text and does a great job at compressing overall, but FLIF is written directly to excel at lossless image compression, hence FLIF will be much better unless it's a really poor solution (which results show it's certainly not). Likewise Brotli will not beat FLAC at compressing audio, since FLAC is specifically written to do that.
- robryk 11y agoActually, FLAC doesn't have a very good compression ratio (e.g. see [1]). It does have features that are very important for audio streams: it can be quickly resynced and AFAIK decompression proceeds at nearly-constant speed. [1] https://news.ycombinator.com/item?id=7893171 https://news.ycombinator.com/item?id=7893171
- gillianseed 11y agoEven so, I would be very surprised if FLAC did not outperform general purpose compressors if the test is done on a wider range of music than a single piano piece (which should be very compressable overall as audio goes). edit: went and did a test on a couple of tracks, using brotli: bro --quality 11 --window 24 against flac -8 (best settings in both cases) satie - gymnopedie no 1: wav: 41.6mb brotli: 28.1mb flac: 14.7mb ram jam - black betty: wav: 41.8 brotli: 35.8 flac: 26.5 vangelis - tao of love: wav: 29.4 brotli: 23.0 flac: 13.4 meat load - paradise by the dashboard light: wav: 89.3 brotli: 78.3 flac: 58.5 certainly not a massive test, and there are likely general purpose compressors which does a better job than brotli, still I feel rather convinced that they will not do better than FLAC other than in extreme cases such as the piano piece you linked to.