A music production tutorial says to add a compressor to the vocal. A file-size guide says to compress the folder. Same word, and neither advice applies to the other. Which "compressor" does a given page mean, and does it have anything to do with file size?

They are two unrelated tools. One makes files smaller. The other makes loud sounds and quiet sounds closer together in level. This guide separates them, explains the controls of the audio kind in plain words with a worked example, and shows where the two meet inside an audio file. This site covers data compression, so the audio kind is explained here only to keep the two apart.

Two ideas that share a name

Data compression Audio dynamics compressor
What it changes The number of bits used to store the data The loudness range of the signal
What it is measured in Ratio, percent saved, bytes Decibels (dB)
Typical settings Method, quality or bitrate Threshold, ratio, attack, release, makeup gain
Where you meet it File formats, archives, downloads Recording, mixing and audio production
Result you check Is the file smaller? Does the level sound more even?
Related guide What is data compression? This article

The rest of this guide is about the right-hand column, because that is the one this site does not otherwise cover.

What a dynamic range compressor does

Dynamic range is the gap between the loudest and softest level, written ΔL = L max − L min in dB, according to MIT OpenCourseWare notes on recording and audio production. A dynamic range compressor reduces that gap. In the Simon Fraser University tutorial's wording, a compressor reduces dynamic range by a ratio other than 1:1. A limiter is the extreme case, with an infinite ratio, and is used to stop peaks from going past a ceiling.

Five controls define its behavior:

  • Threshold: the level above which the compressor starts acting.
  • Ratio: how strongly it acts above the threshold. The MIT notes define it as R = input level change ÷ output level change. At 4:1, every 4 dB the input rises above the threshold becomes 1 dB at the output.
  • Attack: how quickly the compressor takes hold after the level crosses the threshold.
  • Release: how quickly it lets go once the level falls back below.
  • Makeup gain: a fixed boost applied after compression to raise the overall level again.

Attack and release are time settings, and the MIT notes list them in milliseconds. They cannot be read from the static level-in, level-out curve; they describe how fast the compressor reacts.

Worked example. Example: a quiet passage at −40 dB and a loud passage at −8 dB, so the dynamic range is −8 − (−40) = 32 dB. Set the threshold at −20 dB and the ratio at 4:1. The quiet passage is below the threshold and stays at −40 dB. The loud passage is 12 dB above the threshold, and 12 ÷ 4 = 3 dB, so it comes out at −20 + 3 = −17 dB. The range is now −17 − (−40) = 23 dB, which is 9 dB smaller. Apply 9 dB of makeup gain: the loud passage returns to −8 dB and the quiet one rises to −31 dB. The range is still 23 dB. The threshold, ratio and levels here are invented for the illustration.

Why both are called compression

Both reduce something. A dynamic range compressor reduces the span between loud and quiet. Data compression reduces the number of bits. The shared word is the only link. The two work on different things and answer to different measures.

The important difference is what they do to the audio. Lossless data compression returns the original samples exactly, since the FLAC specification defines lossless as decompression returning exactly the original data. A dynamic range compressor changes the sample values on purpose, so the original levels survive only if you keep an unprocessed copy. Lossy data compression, as in MP3 or AAC, also changes the audio, but by discarding detail to save space. The effect on file size is its purpose. For a dynamic range compressor, size is not the point.

Where the two meet in an audio file

They can be used one after the other. First comes dynamics processing, which edits the levels. Then comes data compression, which stores the result in fewer bytes. Neither one replaces the other.

Uncompressed audio size depends only on sample rate × bit depth × channels × seconds ÷ 8. Dynamics processing changes none of those inputs, so the uncompressed size does not change. Example: 3 minutes of stereo audio at 44,100 samples per second and 16 bits is 44,100 × 16 × 2 × 180 ÷ 8 = 31,752,000 bytes, before and after processing. The audio file size calculator gives the same result. A data compressor's output depends on the content of the samples. The processed copy may therefore encode to a different size than the original, and this guide makes no claim about which is smaller.

Bit depth is where the two ideas touch. Each extra bit of depth adds about 6 dB of dynamic range, according to the SFU tutorial, which gives a theoretical 96 dB for 16 bits. The MIT notes list 96 dB for 16-bit audio and 144 dB for 24-bit. A bigger range costs bytes: example, the same 3 minutes at 24 bits is 44,100 × 24 × 2 × 180 ÷ 8 = 47,628,000 bytes, 50% more than at 16 bits.

To measure what a data compressor saved, use the compression ratio calculator. For formats, see lossless and lossy audio formats compared and sample rate and bit depth.

Common mistakes

  • Expecting an audio compressor to shrink the file. It changes levels, not the number of bytes. For uncompressed audio the size stays the same.
  • Expecting a file compressor to even out the loudness. Data compression does not change how loud or quiet a passage is, unless the method is lossy and alters the audio as a side effect.
  • Mixing up the numbers. A ratio of 4:1 in a dynamics compressor refers to decibels above a threshold. A ratio of 4:1 in file compression refers to bytes. Check which tool a ratio comes from before comparing.
  • Assuming a lossy codec is a dynamics compressor. MP3 and AAC discard detail to save space. They are not set with a threshold and attack time.
  • Treating decibels as a storage unit. A 9 dB reduction describes a change in level. It does not translate into 9 of anything on disk. For storage, use the size formulas instead.

FAQ

Is an audio compressor the same as file compression?

No. An audio compressor reduces the difference between loud and quiet levels. File compression reduces how many bytes are stored. The two can both be used on one recording, in separate steps.

Does audio compression make a file smaller?

It depends on which kind you mean. A dynamic range compressor does not change the size of uncompressed audio. Data compression is the kind that makes a file smaller. See lossless vs. lossy compression.

What do threshold and ratio mean?

The threshold is the level where a compressor starts to act, and the ratio says how much it reduces any excess. With a threshold of −20 dB and a ratio of 4:1, an input 12 dB above the threshold comes out 3 dB above it.

Which kind does this site cover?

This site covers data compression: how files shrink, how to measure the result, and how formats and codecs differ. The audio dynamics compressor appears only in this guide, so the two meanings are not confused.

Sources

  1. MIT OpenCourseWare, 21M.380 Music and Technology: Recording Techniques and Audio Production, Session 10: Dynamics and compression. Accessed November 6, 2026.
  2. Simon Fraser University, Barry Truax, Dynamic Range and Compression (Handbook tutorial). Accessed November 6, 2026.
  3. MDN Web Docs, Web audio codec guide. Accessed November 6, 2026.
  4. IETF, RFC 9639: Free Lossless Audio Codec (FLAC). Accessed November 6, 2026.