#zip #zip-archive #request #http-request #http #client #archive

zip_downloader

A simple crate for one-line download and read of ZIP files

3 releases

0.1.2 Oct 28, 2024
0.1.1 Oct 24, 2024
0.1.0 Oct 24, 2024

#33 in #zip-archive

Download history 219/week @ 2024-10-21 166/week @ 2024-10-28

385 downloads per month

MIT/Apache

8KB
82 lines

zip_downloader

A simple Rust crate for one-line download and read of ZIP files. Provide downloaded content as a String or as bytes.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Usage

Library usage example

use zip_downloader::ZipDownloader;

let url = "https://some.url/file.zip";

// Download and get ZIP file as String
let string = ZipDownloader::get(url).unwrap().text().unwrap();

// Download and get ZIP file as bytes
let bytes = ZipDownloader::get(url).unwrap().bytes();

// Download and get 3rd line from ZIP-packed text
let line = ZipDownloader::get(url).unwrap().line(3).unwrap();

// Download and get 3rd byte from ZIP packed byte file
let byte = ZipDownloader::get(url).unwrap().bytes()[3];

Dependencies

~9–21MB
~300K SLoC