Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joseluisq/unzpack
A library to persist ZIP content bytes into a file and extract its content on file system.
https://github.com/joseluisq/unzpack
rust-lang unzip zip
Last synced: 6 days ago
JSON representation
A library to persist ZIP content bytes into a file and extract its content on file system.
- Host: GitHub
- URL: https://github.com/joseluisq/unzpack
- Owner: joseluisq
- License: apache-2.0
- Created: 2020-05-16T23:56:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T09:43:49.000Z (over 4 years ago)
- Last Synced: 2024-04-22T14:23:11.731Z (7 months ago)
- Topics: rust-lang, unzip, zip
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Unzpack [![Build Status](https://travis-ci.com/joseluisq/unzpack.svg?branch=master)](https://travis-ci.com/joseluisq/unzpack) [![Crates.io](https://img.shields.io/crates/v/unzpack)](https://crates.io/crates/unzpack) [![Released API docs](https://docs.rs/unzpack/badge.svg)](https://docs.rs/unzpack)
> A library to persist ZIP content bytes into a file and extract its content on file system.
**Unzpack** is just a helper which persists ZIP bytes content on file system, then extract its content into a specific directory path and finally deletes current ZIP file.
For example, it can be useful when ZIP content is provided via [include_bytes!](https://doc.rust-lang.org/std/macro.include_bytes.html) macro.
## Usage
```toml
[dependencies]
unzpack = "0.1"
``````rust
use unzpack::Unzpack;const BYTES: &[u8] = include_bytes!("data/assets.zip");
fn main() -> Result<(), Box> {
Unzpack::unpack(
BYTES, // Zip bytes
"./out-file.zip", // Output Zip file
"./out-dir", // Output extraction directory
)?;Ok(())
}
```View [code example](./examples).
## Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.
Feel free to send some [Pull request](https://github.com/joseluisq/unzpack/pulls) or [issue](https://github.com/joseluisq/unzpack/issues).
## License
This work is primarily distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache License (Version 2.0)](LICENSE-APACHE).
© 2020 [Jose Quintana](https://git.io/joseluisq)