zip-extract
zip-extract copied to clipboard
Extract zip archives using the zip crate.
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
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 are the same as the features of the zip crate:
aes-crypto: Support for AES encryption via the thezipcratedeflate: Support for the Deflate algorithm (miniz_oxiderust-backend)deflate-miniz: ^ dito (minizC-backend)deflate-zlib: ^ dito (zlibC-backend)unreserved: Support for theunreservedfeature of thezipcratebzip2: Support for .bzip2 archives via thebzip2cratetime: Support for thetimecrate for thezipcratezstd: Support for thezstdcrate for thezipcratedefault: enables"aes-crypto", "bzip2", "deflate", "zstd"