()
| 268 | |
| 269 | #[test] |
| 270 | fn high_compression_level() { |
| 271 | let data: Vec<u8> = (0..10_000).map(|i| (i % 256) as u8).collect(); |
| 272 | let default_encoded = encode(&data).unwrap(); |
| 273 | let high_encoded = encode_with_level(&data, HIGH_LEVEL).unwrap(); |
| 274 | |
| 275 | // High level should produce smaller output (or equal). |
| 276 | assert!(high_encoded.len() <= default_encoded.len() + 10); |
| 277 | |
| 278 | // Both should roundtrip correctly. |
| 279 | assert_eq!(decode(&default_encoded).unwrap(), data); |
| 280 | assert_eq!(decode(&high_encoded).unwrap(), data); |
| 281 | } |
| 282 | |
| 283 | #[test] |
| 284 | fn header_metadata() { |
nothing calls this directly
no test coverage detected