$ lz4_flex
v0.12.1Fastest LZ4 implementation in Rust, no unsafe by default.
Latest Update Summary
Crate
Name: lz4_flex New version: 0.12.0 Release date: 2025-11-11T10:55:12.125073Z
Crate readme
Short description Fastest LZ4 implementation in Rust.
Long description
lz4_flex is a high-performance LZ4 compression library for Rust, featuring both block and frame formats. It supports no_std for the block format and offers feature flags for controlling safe and unsafe code usage. Benchmarks show it's one of the fastest implementations available. The library is compatible with various platforms and includes benchmarks against other LZ4 implementations.
Features • High performance • LZ4 Block format • LZ4 Frame format • Feature flags to configure safe/unsafe code usage • no-std support with block format • 32-bit support
Code Examples Usage Example for Compression and Decompression
use lz4_flex::block::{compress_prepend_size, decompress_size_prepended};
fn main(){
let input: &[u8] = b"Hello people, what's up?";
let compressed = compress_prepend_size(input);
let uncompressed = decompress_size_prepended(&compressed).unwrap();
assert_eq!(input, uncompressed);
}
Safe Dependency Declaration
lz4_flex = { version = "0.12" }
Performance Dependency Declaration
lz4_flex = { version = "0.12", default-features = false }
Links • https://docs.rs/lz4_flex • https://crates.io/crates/lz4_flex • https://crates.io/crates/lz4-compress • https://github.com/main--/rust-lz-fear • https://crates.io/crates/lzzzz • https://github.com/burntsushi/rust-snappy • https://github.com/rust-lang/miri • https://github.com/antoniomuso/lz4-napi • https://github.com/PSeitz/lz4-wasm • https://github.com/LVivona/safelz4
https://api.github.com/repos/PSeitz/lz4_flex/releases/109034359
Release info
Release version:
Release description
Code Examples
Patch update: 0.12.0 → 0.12.1
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add lz4_flexOr add to Cargo.toml: lz4_flex = "0.12.1"