Function decompress_slice

pub fn decompress_slice<'a>(output: &'a mut [u8], input: &[u8], config: InflateConfig) -> (&'a mut [u8], ReturnCode)

Decompresses input into the provided output buffer.

Returns a subslice of output containing the decompressed bytes and a ReturnCode indicating the result of the operation. Returns ReturnCode::BufError if there is insufficient output space.

Example

# use zlib_rs::*;
# fn foo(compressed: &[u8]) {
let mut buffer = [0u8; 1024];
let (decompressed, rc) = decompress_slice(&mut buffer, compressed, InflateConfig::default());
assert_eq!(rc, ReturnCode::Ok);
# }