[][src]Function explode::explode_with_buffer

pub fn explode_with_buffer(data: &[u8], buf: &mut [u8]) -> Result<Vec<u8>>

Decompress a block of data in memory, using the given auxiliary buffer buf.

This gives you control over the size of the internal buffer used. If you do not need that control, use explode instead.

let mut buf: [u8; 1] = [0; 1];
let bytes = vec![0x00, 0x04, 0x82, 0x24, 0x25, 0x8f, 0x80, 0x7f];
let result = explode::explode_with_buffer(&bytes, &mut buf)?;
assert_eq!(result, "AIAIAIAIAIAIA".as_bytes());