compression ratio
also: compression factor, compression rate
Compression ratio is the percentage or factor describing how much a file or data has been reduced in size after compression. It's calculated as the ratio of original size to compressed size, with higher ratios indicating greater compression.
Compression ratio quantifies the effectiveness of a compression algorithm by comparing the original data size to the compressed size. It's commonly expressed as a percentage (original size ÷ compressed size × 100) or as a ratio like 3:1, meaning the original was three times larger than the compressed version.
For example, if a text file of 100 MB compresses to 25 MB, the compression ratio is 4:1 (or 25%). Different file types compress differently: text files typically achieve high ratios (often 5:1 or better), while images and videos already compressed in their format achieve poor ratios (often under 1.1:1).
You can see compression ratios in action with tools like gzip or tar. Running gzip -l archive.gz displays compression statistics including the ratio achieved, helping you understand how effectively the data was condensed.