Skip to content

Quick Start

zesven is a pure-Rust library for reading and writing 7z archives.

Installation

sh
cargo add zesven

Extract 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 contentsReading Archives
Extract specific filesSelective Extraction
Create compressed archivesWriting Archives
Work with encrypted archivesEncryption
Process large archives efficientlyStreaming API
Use async/await with TokioAsync API

Reference

Released under MIT OR Apache-2.0 License