Compute the compression ratio and rate from original and compressed sizes to quantify compression effectiveness.
压缩率越接近 100% 压缩越强。
| Item | Formula / Rule | Source / Standard |
|---|---|---|
| Compression ratio | Ratio = original bytes ÷ compressed bytes | RFC 1951 DEFLATE Compressed Data Format Specification |
| Space saving | Saving = (original − compressed) ÷ original × 100% | RFC 1952 GZIP File Format Specification §2 |
| Lossless lower bound | Average code length ≥ H(X); entropy is the theoretical floor for lossless coding | Shannon, A Mathematical Theory of Communication, 1948 |