Function xz_decom::decompress [] [src]

pub fn decompress(compressed_data: &[u8]) -> Result<Vec<u8>, XZError>

Decompress some data

The input slice should contain the full chunk of data to decompress. There is no support for partial decompression

Example

Pretty simple:

let data = include_bytes!("data/hello.xz");

let result = decompress(data).unwrap();
assert_eq!(result, "hello".as_bytes());