🗜️ Data Compression Ratio
Compute the compression ratio and rate from original and compressed sizes to quantify compression effectiveness.
📐 計算公式與說明
壓縮效果三卡:壓縮率 = (1 − 壓縮後位元組 ÷ 原始位元組) × 100%(保留 2 位小數)、壓縮比 = 原始位元組 ÷ 壓縮後位元組(×,保留 2 位小數)、總節省位元組 = (原始 − 壓縮後) × 檔案數。校驗:原始、壓縮後、檔案數三項非空守衛,數值非數按 0 兜底。判據:壓縮率與壓縮比同向聯動(壓縮率越接近 100% 壓縮比越大),總節省隨檔案數線性放大。
壓縮率越接近 100% 壓縮越強。