arkiv 0.5.1

library providing convenience function to manipulate various kind of archive (zip, tar.gz, tar.xz, ... )
Documentation

Arkiv

Crates.io Docs.rs Crates.io Crates.io

Build Build Clippy

Arkiv is a convenience library to open, consult and extract archives of various format through a single interface.

Usage

use arkiv::{Result, Archive};

fn main() -> Result<()> {
    // open the archive
    let mut archive = arkiv::Archive::open("path/to/archive.tar.xz")?;

    // iterate over entries
    for entry in archive.entries_iter()? {
        let entry = entry?;
        println!("{}", entry.path().display());
    }

    // extract the archive (perserves permission on unix targets)
    archive.unpack("/tmp/")?;

    Ok(())
}