Function lzzzz::lz4_hc::compress_to_vec
source · [−]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)?;