https://github.com/paolobarbolini/bzip2-rs
Pure Rust bzip2 decoder
https://github.com/paolobarbolini/bzip2-rs
bzip2 compression hacktoberfest
Last synced: 3 months ago
JSON representation
Pure Rust bzip2 decoder
- Host: GitHub
- URL: https://github.com/paolobarbolini/bzip2-rs
- Owner: paolobarbolini
- License: apache-2.0
- Created: 2021-01-30T14:32:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-28T07:16:05.000Z (7 months ago)
- Last Synced: 2025-03-29T06:05:03.622Z (4 months ago)
- Topics: bzip2, compression, hacktoberfest
- Language: Rust
- Homepage:
- Size: 361 KB
- Stars: 46
- Watchers: 4
- Forks: 6
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bzip2-rs
[](https://crates.io/crates/bzip2-rs)
[](https://docs.rs/bzip2-rs)
[](https://deps.rs/crate/bzip2-rs/0.1.2)
[](https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html)
[](https://github.com/paolobarbolini/bzip2-rs/actions?query=workflow%3ACI)Pure Rust 100% safe bzip2 decompressor.
## Features
* `rayon`: enable using the [rayon] global threadpool for parallel decoding.
NOTE: this feature is not subject to a MSRV. At the time of writing the MSRV for rayon is 1.63* Default features: Rust >= 1.63 is supported
* `nightly`: require Rust Nightly, enable more optimizations## Usage
```rust
use std::fs::File;
use std::io;
use bzip2_rs::DecoderReader;let mut compressed_file = File::open("input.bz2")?;
let mut decompressed_output = File::create("output")?;let mut reader = DecoderReader::new(compressed_file);
io::copy(&mut reader, &mut decompressed_output)?;
```## Upcoming features
* bzip2 encoding support
* no_std support (is anybody interested with this?)## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you shall be dual licensed as above, without any
additional terms or conditions.[rayon]: https://crates.io/crates/rayon