
FLAC audio format

Lossless compression: Encoded audio data (PCM) is lossless, and the decoded output audio is the same as each byte of the encoder input.

Each data frame has a 16-bit CRC check code of the current frame, which is used to control data transmission errors. For the entire piece of audio data, there is also an MD5 mark for the original uncompressed audio data in the file header, which is used to verify the data during decoding and testing. When the computer plays WAV files, it sends the PCM data in the WAV files directly to the sound card, whereas when the computer plays FLAC, it must first decode FLAC into PCM data and then send it to the sound card. It is an additional decryption link, like decompressing a RAR file. Your PCM data is no different from WAV before compression.
Fast: FLAC pays more attention to decoding speed. Decoding requires only integer operations and requires very little computational speed compared to most encoding methods. Real-time decoding can be easily implemented on very common hardware.
Hardware support: Since FLAC provides free decoding examples and decoding complexity is low, as of 2012 FLAC is the only lossless compression encoding that has received wide and good hardware support.
It can be used to stream media: each FLAC data frame contains all the information needed for decoding. The current frame is decoded without reference to previous or subsequent data frames. FLAC uses a synchronization code and CRC (similar to encoding formats such as MPEG), so the decoder can experience minimal time delay when jumping in the data stream.
Positionable: FLAC supports fast sampling and precise positioning. This is not only good for playback, but also makes FLAC files easy to edit.
Flexible metadata: New types of metadata data blocks can be defined and implemented without affecting the use of legacy decoders and data streams. Existing metadata types include tags, reference tables, and positioning tables. Registered applications can define their own dedicated metadata types (Note: this is similar to standard MIDI).
Ideal for Archival Applications: FLAC is an open encoding format, and without any data loss, you can convert it to any other format you need. In addition to CRC and MD5 marking of each data frame to ensure data integrity, flac (annotation: the command-line encoding tool provided by the FLAC project) also provides a verification (verification) option, when use this option to encode, while encoding will immediately decode the encoded data and compare it with the original input data. Once it finds a difference, it will go out and give an alarm.
Easy to back up CDs: FLAC has a “CUE table” metadata data block to store the CD’s table of contents and index points for all tracks. You can save a CD as a single file and import the CD reference table, so that a FLAC file can fully record all the information of the entire CD, that is, you can embed the CUE file that is usually stored separately. in FLAC in the file. When your original CD is damaged, you can use this file to restore a copy of the CD that is exactly the same as the original.
Anti-corruption: Due to the frame structure of FLAC, once the data stream is damaged, the loss will be limited to the damaged data frame. Usually only a very short snippet will be lost. When many other lossless audio compression formats suffer corruption, a corruption will cause all subsequent data to be lost.














