In short, how does FLAC compression work?
It approximates the data by approximately modelling (using a choice of trivially-computed waves) the input data, and uses "rice codes" to store the necessary adjustments to match the sampled data. Such that the less the data differs from the wave the fewer bytes are needed.
Hashes are added as a promise that this process is lossless, and the format supports metadata (including cover image) & chunking.
Total supporter of open source codecs here, but I never thought about how flac works in detail. Thanks for the explanation!
For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).