# Lz4rip 0.8.5 + zrip 0.3.4

**URL:** <https://users.rust-lang.org/t/lz4rip-0-8-5-zrip-0-3-4/140839>\
**Category:** announcements\
**Created:** [June 20, 2026, 2:22am UTC](https://users.rust-lang.org/t/lz4rip-0-8-5-zrip-0-3-4/140839 "2026-06-20T02:22:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paddor](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/paddor/32/52481_2.png) [@paddor](https://users.rust-lang.org/u/paddor)\
**Post date:** [June 20, 2026, 2:22am UTC](https://users.rust-lang.org/t/lz4rip-0-8-5-zrip-0-3-4/140839/1 "2026-06-20T02:22:17Z")

</div>

Combined update on two safe-Rust compression crates.

## [lz4rip](https://crates.io/crates/lz4rip) ([repo](https://github.com/paddor/lz4rip))

v0.1.0 =\> v0.8.5 since the [initial post](https://users.rust-lang.org/t/lz4rip-safe-rust-lz4-on-par-with-c-impl):

- **Workspace split** into `lz4rip-encode` / `lz4rip-decode` / `lz4rip-core`. Separate LLVM compilation units eliminate a class of regressions where dead encoder code shifts register allocation in the decoder. Decompress improved 4-17% across Silesia; gap vs C lz4 narrowed from 10-33% to 2-21%
- **8 KB hash tables** , half the L1d footprint of C lz4 and lz4\_flex. Epoch-based table reuse skips clearing between calls for small inputs. Dual-table dictionary compression uses a read-only pristine table probed on main-table miss.
- **`no_std` / no-alloc** : block compress and decompress work without `std` or `alloc`. Hash tables go on the stack (~8 KB).
- **Built-in dictionary training** : `DictTrainer` (COVER-based) learns a dictionary from your data. No external tools needed.

[x86\_64 summary chart](https://raw.githubusercontent.com/paddor/lz4rip/main/doc/charts/x86_64/summary.svg) | [aarch64 summary chart](https://raw.githubusercontent.com/paddor/lz4rip/main/doc/charts/aarch64/summary.svg)

## [zrip](https://crates.io/crates/zrip) ([repo](https://github.com/paddor/zrip))

v0.1.0 =\> v0.3.4 since the [initial post](https://users.rust-lang.org/t/zrip-safe-rust-zstd-codec-levels-7-4):

- **Workspace split** into `zrip-encode` / `zrip-decode` / `zrip-core`.
- **Encode +4-17%, decode +5-24%** across all levels via instruction count reduction, branch hints, and inlined rep offsets.
- **Streaming dictionary compression** : `FrameEncoder::with_dict()`, `FrameDecoder::with_dict()`, `CompressContext::with_dict()` for buffer-reusing streaming with trained dictionaries.

Fastest pure-Rust zstd encoder that isn't just unsafe from beginning to end. `libzstd-rs-sys` is a c2rust translation of C zstd with pervasive unsafe throughout, and `structured-zstd` is similarly unsafe-heavy. zrip is safe Rust you can actually audit.

[x86\_64 summary chart](https://raw.githubusercontent.com/paddor/zrip/main/doc/charts/x86_64/summary.svg) | [aarch64 summary chart](https://raw.githubusercontent.com/paddor/zrip/main/doc/charts/aarch64/summary.svg)  
[x86\_64 scatter chart](https://raw.githubusercontent.com/paddor/zrip/main/doc/charts/x86_64/scatter.svg) | [aarch64 scatter chart](https://raw.githubusercontent.com/paddor/zrip/main/doc/charts/aarch64/scatter.svg)

* * *

All algorithm logic in both crates enforces `#[forbid(unsafe_code)]`. Unsafe is confined to raw memory operations whose bounds are proven by the surrounding safe code.

lz4rip is used in [OMQ.rs](https://github.com/paddor/omq.rs), a Rust implementation of ZMQ, for message-level compression in tight loops where compress+send+decompress latency dominates. The results [are nuts](https://github.com/paddor/omq.rs/blob/main/BENCHMARKS_COMPRESSION.md), especially with a trained dictionary.

---

<div class="post-metadata">

**Author:** ![loadingalias](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/loadingalias/32/45917_2.png) [@loadingalias](https://users.rust-lang.org/u/loadingalias)\
**Post date:** [June 25, 2026, 10:23pm UTC](https://users.rust-lang.org/t/lz4rip-0-8-5-zrip-0-3-4/140839/2 "2026-06-25T22:23:35Z")

</div>

Hey, great work.

Let's talk man! I'm on Twitter/X, too. Whatever works.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [September 23, 2026, 10:24pm UTC](https://users.rust-lang.org/t/lz4rip-0-8-5-zrip-0-3-4/140839/3 "2026-09-23T22:24:03Z")

</div>

Closed on September 23, 2026, 10:24pm UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
