7z libraries for Rust
The crate to use for 7z in Rust is:
- sevenz-rust2: Rust (pure Rust with the default features), reads and writes 7z with LZMA, LZMA2, BZip2, PPMd, and optionally Deflate, Zstandard, Brotli and LZ4, the BCJ filters (BCJ2 read only) and AES-256 encryption including encrypted headers. It creates solid and non-solid archives and compiles to WebAssembly.
sevenz-rust2 is the maintained fork of the original sevenz-rust crate, which is no longer developed; new code should depend on sevenz-rust2. The compress-tools crate (bindings to libarchive) also reads 7z if you already use libarchive for other formats.
- sevenz-rust2 sevenz-rust2 is a pure-Rust crate for reading and writing 7z archives. How to add it with cargo, extract and create 7z files, list entries.