#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 5598/week @ 2024-10-15 4137/week @ 2024-10-22 4382/week @ 2024-10-29 4407/week @ 2024-11-05 4827/week @ 2024-11-12 5352/week @ 2024-11-19 7731/week @ 2024-11-26 6028/week @ 2024-12-03 6198/week @ 2024-12-10 6016/week @ 2024-12-17 6188/week @ 2024-12-24 5210/week @ 2024-12-31 7476/week @ 2025-01-07 6486/week @ 2025-01-14 6032/week @ 2025-01-21 6191/week @ 2025-01-28

27,396 downloads per month
Used in 59 crates (41 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