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

Appends compressed data to Vec<u8>.

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

Example

use lzzzz::{lz4, lz4_hc};

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

lz4_hc::compress_to_vec(data, &mut buf, lz4_hc::CLEVEL_DEFAULT)?;