pub fn decompress_slice<'a>(
output: &'a mut [u8],
input: &[u8],
config: InflateConfig,
) -> (&'a mut [u8], ReturnCode)Expand description
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
let mut buffer = [0u8; 1024];
let (decompressed, rc) = decompress_slice(&mut buffer, compressed, InflateConfig::default());
assert_eq!(rc, ReturnCode::Ok);