Function rust_lzss::decompress
[−]
[src]
pub fn decompress<T: Read + Seek>(data: &mut T) -> Result<Vec<u8>, Error>
Parses an LZSS header and data block returning the decompressed result
Assumes LZSS is constructed properly
Panics
Will panic if the size in the data header is incorrect
Errors
Returns an Error if the type is invalid or the size is wrong
Examples
use rust_lzss::decompress; use std::io::Cursor; let lzss10: [u8; 11] = [ 0x10, 0x14, 0x00, 0x00, 0x08, 0x61, 0x62, 0x63, 0x64, 0xD0, 0x03, ]; // abcdabcdabcdabcdabcdabcd let decoded = decompress(&mut Cursor::new(lzss10));