zip-extensions 0.1.3

An extension create for zip.
Documentation

zip-extensions-rs

Build status Crates.io

An extension crate for https://github.com/mvdnes/zip-rs that provides high-level functions for common ZIP tasks, such as extracting archives to a directory.

Usage examples

Configure dependencies

Add the following dependencies to the Cargo.toml file.

[dependencies]

zip = "0.5.5"

zip-extensions = "0.1.1"

See https://github.com/mvdnes/zip-rs fur further information about zip dependencies.

Extracting an archive to a directory

The ZipArchiveExtensions trait provides the extract method that can be used to unzip an archive to a directory.

use std::fs::File;
use zip_extensions::read_extensions::ZipArchiveExtensions;

let file = File::open(archive_file).unwrap();
let mut archive = zip::ZipArchive::new(file).unwrap();
archive.extract(&target_path).unwrap();