explode

Crates.ioexplode
lib.rsexplode
version0.1.2
sourcesrc
created_at2020-08-20 23:46:46.434051
updated_at2020-08-21 20:12:35.633064
descriptionA decompression implementation for the implode algorithm from the PKWARE Data Compression Library.
homepage
repositoryhttps://github.com/agrif/explode
max_upload_size
id278955
size57,233
Aaron Griffith (agrif)

documentation

https://docs.rs/explode

README

explode

build status crates.io docs.rs

A decompression implementation for the implode algorithm from the PKWARE Data Compression Library.

This implementation is based on blast.c by Mark Adler, distributed with zlib.

Examples

To decompress a block of bytes in memory, use explode.

let bytes = vec![0x00, 0x04, 0x82, 0x24, 0x25, 0x8f, 0x80, 0x7f];
let result = explode::explode(&bytes)?;
assert_eq!(result, "AIAIAIAIAIAIA".as_bytes());

To decompress a File or other type that implements Read, use ExplodeReader.

use std::io::Read;
let mut reader = explode::ExplodeReader::new(some_file);
let mut decompressed = vec![];
reader.read_to_end(&mut decompressed)?;
// or other functions from Read

For more complicated uses that do not fit into these categories, use Explode.

License

Licensed under the MIT license. Unless stated otherwise, any contributions to this work will also be licensed this way, with no additional terms or conditions.

Commit count: 23

cargo fmt