Quick Start
zesven is a pure-Rust library for reading and writing 7z archives.
Installation
sh
cargo add zesvenExtract an Archive
rust
use zesven::{Archive, ExtractOptions};
fn main() -> zesven::Result<()> {
let mut archive = Archive::open_path("archive.7z")?;
archive.extract("./output", (), &ExtractOptions::default())?;
Ok(())
}Create an Archive
rust
use zesven::{Writer, ArchivePath};
fn main() -> zesven::Result<()> {
let mut writer = Writer::create_path("backup.7z")?;
writer.add_path("document.pdf", ArchivePath::new("document.pdf")?)?;
writer.finish()?;
Ok(())
}What's Next?
Cookbook — practical examples for common tasks
By Task
| I want to... | Go to |
|---|---|
| Open and list archive contents | Reading Archives |
| Extract specific files | Selective Extraction |
| Create compressed archives | Writing Archives |
| Work with encrypted archives | Encryption |
| Process large archives efficiently | Streaming API |
| Use async/await with Tokio | Async API |
Reference
- Feature Flags — customize your build
- Error Handling — error types and patterns
- API Docs — full API reference on docs.rs