rusty_zstd 0.1.0

A ground-up, pure-Rust Zstandard (RFC 8878) compressor and decompressor. Levels -7..22 with all nine libzstd strategies, dictionaries + trainer, long-distance matching, seekable frames, multi-threading. Interoperable both directions with facebook/zstd v1.5.7, dual-gated per commit. Zero dependencies, no C, no *-sys, no FFI; builds on no_std + alloc and wasm32. MIT OR Apache-2.0.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Block-type census of a .zst file: `cargo run --example census -- f.zst`
fn main() {
    for p in std::env::args().skip(1) {
        let src = std::fs::read(&p).expect("read");
        match rusty_zstd::frame_block_census(&src) {
            Ok(c) => println!(
                "{p}\n  raw={} ({} B)  rle={} (regen {} B)  compressed={} (payload {} B)  file={} B",
                c.raw, c.raw_bytes, c.rle, c.rle_regen, c.compressed, c.compressed_payload, src.len()
            ),
            Err(e) => println!("{p}: census error {e:?}"),
        }
    }
}