[][src]Function lzzzz::lz4::compress_to_vec

pub fn compress_to_vec(src: &[u8], dst: &mut Vec<u8>, acc: i32) -> Result<usize>

Appends compressed data to Vec<u8>.

Returns the number of bytes appended to the given Vec<u8>.

Example

use lzzzz::lz4;

let data = b"The quick brown fox jumps over the lazy dog.";
let mut buf = Vec::new();

lz4::compress_to_vec(data, &mut buf, lz4::ACC_LEVEL_DEFAULT)?;