lz4
ModuleLZ4.
Contents
use utopia_compression::Lz4;Rust
pub struct Lz4LZ4 blocks with ext-lz4's framing: the uncompressed size as a 4-byte little-endian prefix, then one LZ4 block.
Rust
use utopia_compression::{Algorithm, Lz4};
let lz4 = Lz4::new();
let body = lz4.compress(b"This is a demo string")?;
assert_eq!(body.len(), 27);
assert_eq!(lz4.decompress(&body)?, b"This is a demo string");