Author: Shiguang

Reviewer: Baiyan

  Before we begin, consider a question: why compress a file? Unsure, you set the question aside and decide to download something. After opening NetEase Cloud Music, you find several songs you like in the daily recommendations and immediately try to save them. The download menu offers lossless, high, and standard quality. Wanting the best for your ears, you choose lossless, only to be asked to buy a membership. Frustrated, you… choose high quality instead.

  Thinking back to the original question, you wonder whether the high-quality version is simply a compressed form of the lossless one, since its file is smaller. It is. Although the high-quality version does not sound quite as good as the lossless version, it takes up less disk space and is easier to transmit. Compression is therefore important for audio. Of course, it can also persuade people to pay for a membership…

  That is enough of the digression. Let us look at the basic approaches to audio compression, starting with the formula for file size:

  File size = duration  sampling rate  bit depth * number of channels

  Because the duration of an audio recording cannot be changed, we have three options: lower the sampling rate, reduce the bit depth, or use fewer channels.

  First, consider the sampling rate. A higher sampling rate generally produces better audio quality. Common sampling rates are shown below:

  The lowest rate shown is 11,025 Hz, used for speech and amplitude-modulation (AM) radio. Frequency-modulation (FM) radio uses twice the sampling rate of AM radio. This is one reason car listeners generally choose an FM station rather than an AM station: FM offers better sound quality. If you are curious, compare the two the next time you are in a car.

  Another way to compress audio is to reduce its bit depth. Common bit depths are 8 and 16 bits. Converting a 16-bit audio file of about 10 MB to 8 bits can reduce its size by roughly 5 MB. Ordinary speech, which does not demand high fidelity, generally uses a bit depth of 8 bits. Music that requires better sound quality usually uses 16 bits; few people want to listen to a song buried in noise.

  What does the number of channels mean? Stereophonic audio is a method of sound reproduction that generally uses at least two audio channels. The listener perceives sound coming from two directions, giving it spatial depth and making it closer to natural sound. Removing one channel from a two-channel stereo recording halves the file size. This also degrades the sound, so the technique is suitable only for brief sound effects or speech, not for music.

  Audio files are also poorly suited to lossless compression because consecutive audio samples rarely have identical values. Lossy formats such as MP3 are more common. MP3 provides a good compression ratio while preserving acceptable audio quality.