Returns the compression ratio (compressed / uncompressed). Returns `f64::NAN` if the uncompressed length is zero.
(&self)
| 317 | /// |
| 318 | /// Returns `f64::NAN` if the uncompressed length is zero. |
| 319 | pub fn compression_ratio(&self) -> f64 { |
| 320 | if self.chunk.length == 0 { |
| 321 | return f64::NAN; |
| 322 | } |
| 323 | self.compressed_data.len() as f64 / self.chunk.length as f64 |
| 324 | } |
| 325 | |
| 326 | /// Returns the space savings as a percentage (0.0 to 100.0). |
| 327 | pub fn space_savings_pct(&self) -> f64 { |