#zip-archive #zip #extract #archive

zip-extract

Archive extraction via zip-rs, automated

6 releases

0.2.1 Aug 26, 2024
0.2.0 Aug 24, 2024
0.1.3 Jan 22, 2024
0.1.2 Feb 26, 2023
0.1.0 Jun 22, 2020

#31 in Compression

Download history 4895/week @ 2024-08-15 4588/week @ 2024-08-22 4139/week @ 2024-08-29 5450/week @ 2024-09-05 4051/week @ 2024-09-12 4007/week @ 2024-09-19 4242/week @ 2024-09-26 4445/week @ 2024-10-03 4562/week @ 2024-10-10 5455/week @ 2024-10-17 4279/week @ 2024-10-24 4420/week @ 2024-10-31 4459/week @ 2024-11-07 5142/week @ 2024-11-14 5486/week @ 2024-11-21 6915/week @ 2024-11-28

22,824 downloads per month
Used in 55 crates (39 directly)

MIT license

170KB
114 lines

zip-extract

CI Crates.io Docs.rs

zip-extract's primary goal is simple: Automate tedious zip extraction. Ever wanted to just unpack an archive somewhere? Well, here you go.

Usage

let archive: Vec<u8> = download_my_archive()?;
let target_dir = PathBuf::from("my_target_dir"); // Doesn't need to exist

// The third parameter allows you to strip away toplevel directories.
// If `archive` contained a single directory, its contents would be extracted instead.
zip_extract::extract(Cursor::new(archive), &target_dir, true)?;

Features

All features passed through to zip2.


lib.rs:

zip-extract

zip-extract's primary goal is simple: Automate tedious zip extraction. Ever wanted to just unpack an archive somewhere? Well, here you go:

Usage

See extract for details.

let archive: Vec<u8> = download_my_archive()?;
let target_dir = PathBuf::from("my_target_dir"); // Doesn't need to exist

// The third parameter allows you to strip away toplevel directories.
// If `archive` contained a single folder, that folder's contents would be extracted instead.
zip_extract::extract(Cursor::new(archive), &target_dir, true)?;

Features

All features are passed through to zip2, refer to the documentation for defaults and a list of features.

Dependencies

~7.5MB
~132K SLoC