autozstd 0.2.0

Zstd envelope compression with automatic raw fallback and magicless frames
Documentation
1
2
3
4
5
6
7
8
9
10
use autozstd::Adaptive;

fn main() {
  let mut codec = Adaptive::new();
  let data = b"hello world ".repeat(10_000);
  for speed in [100_000, 1_000_000, 10_000_000, 1_000_000_000] {
    let packed = codec.encode(&data, speed);
    println!("{speed} B/s -> {} bytes", packed.len());
  }
}