Function uclcli::decompress[][src]

pub fn decompress(
    src: &[u8],
    dst_capacity: u32
) -> Result<Vec<u8>, UclErrorKind>
Expand description

decompress a NRV compressed buffer into a newly allocated buffer

If dst_capacity is not enough to hold the decompressed buffer, this will return Err(UclErrorKind::OutputOverrun). If decompression succeeded, this will return the decompressed buffer.

Panics

If ucl_init was not called prior to calling this function, this function will panic.

assert_eq!(uclcli::decompress(b"\x92\xa5\xaa\xa1\x00\x00\x00\x00\x00\x04\x80\xff", 1024).unwrap(), [0xa5u8; 1024]);