Expand description
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 ReadFor more complicated uses that do not fit into these categories,
use Explode.
Structs§
- Explode
- Low-level decompression interface.
- Explode
Buffer - A handle to feed input to the decompressor.
- Explode
Reader - A
Readwrapper that decompresses.
Enums§
- Error
- Error type produced by decompression.
Functions§
- explode
- Decompress a block of
datain memory. - explode_
with_ buffer - Decompress a block of
datain memory, using the given auxiliary bufferbuf.
Type Aliases§
- Result
- Result type for decompression functions.