()
| 389 | |
| 390 | #[test] |
| 391 | fn compression_vs_raw() { |
| 392 | let values: Vec<i64> = (0..10_000) |
| 393 | .map(|i| 1_700_000_000_000 + i * 10_000) |
| 394 | .collect(); |
| 395 | let encoded = encode(&values); |
| 396 | let raw_size = values.len() * 8; |
| 397 | let ratio = raw_size as f64 / encoded.len() as f64; |
| 398 | assert!(ratio > 2.0, "expected >2x compression, got {ratio:.1}x"); |
| 399 | } |
| 400 | |
| 401 | #[test] |
| 402 | fn bit_width_calculation() { |