#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

#33 in Compression

Download history 4318/week @ 2024-10-30 4417/week @ 2024-11-06 4962/week @ 2024-11-13 5415/week @ 2024-11-20 7970/week @ 2024-11-27 5936/week @ 2024-12-04 6131/week @ 2024-12-11 5974/week @ 2024-12-18 5814/week @ 2024-12-25 5687/week @ 2025-01-01 7496/week @ 2025-01-08 6289/week @ 2025-01-15 6280/week @ 2025-01-22 7460/week @ 2025-01-29 7152/week @ 2025-02-05 5577/week @ 2025-02-12

27,379 downloads per month
Used in 58 crates (40 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
~131K SLoC