lzvn
lzvn is a safe, clean-room Rust implementation of Apple's LZVN format.
Current scope:
- raw LZVN stream encoding
- raw LZVN stream decoding
- incremental raw encoder and decoder state machines
- Apple
bvxnblock encoding - Apple
bvxnblock decoding - incremental
bvxnencoder and decoder state machines - Apple
decmpfsxattr and resource-fork encode/decode helpers for LZVN - no
unsafecode - Apache-2.0 licensing
Planned next steps:
- higher-level APFS / HFS+ integration helpers
- fuzzing, benchmarks, and differential tests against Apple-compatible output
Validation:
cargo testcargo test --test differentialcargo clippy --all-targets --all-features -- -D warningscargo bench
Release:
- push a tag matching the crate version, for example
0.1.1, to trigger the release workflow - the workflow verifies the tag matches
Cargo.toml, runs clippy and tests, packages the crate, and creates a GitHub release with the.cratefile and sha256 checksum
Fuzzing:
- install
cargo-fuzzwithcargo install cargo-fuzz - run
cargo fuzz run raw_decode - run
cargo fuzz run bvxn_decode - run
cargo fuzz run decmpfs_decode - run
cargo fuzz run roundtrip
Fixtures:
- real-world regression fixtures live in
tests/fixtures/ - source urls and license notes are documented in
tests/fixtures/README.md - fuzz seed corpora live in
fuzz/corpus/
Install:
cargo add lzvn
Example:
let encoded = encode_raw;
let decoded = decode_raw?;
assert_eq!;
# Ok::