logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

Original article
github.com|53 points|10 comments|by nonadhocproblem|Jul 15, 2026

Introducing misa77: A High-Velocity Decompression Codec

The Core Value Proposition: misa77 is an LZ-based codec engineered specifically for "write-once, read-many" workloads. It achieves decompression speeds 1.5x to 3x faster than LZ4 on both ARM and x86 architectures, often while maintaining superior compression ratios.


🎯 Design Philosophy & Objectives

The development of misa77 is driven by a specific set of technical priorities:

  • Maximum Throughput: Prioritizing extreme single-threaded decompression speed above all else.
  • Competitive Ratios: While it lacks an entropy backend (meaning it isn't designed to compete with zstd), it aims to match or beat LZ4 at high effort levels.
  • Predictable Memory Footprint:
    • Compression: ≈5 MB\approx 5\text{ MB}≈5 MB (constant across all modes).
    • Decompression: 0 MB0\text{ MB}0 MB overhead.

The Fundamental Trade-off

To achieve these decompression speeds, misa77 accepts a significant penalty during the encoding phase.

Interestingly, misa77 exhibits a synergistic effect: the more compressed a file is, the faster it typically decompresses. This encourages the use of high-effort compression to create streams that are more "friendly" to modern CPU pipelines.


⚙️ Compression Configuration (v0.2.0)

Users can choose between two primary effort levels:

LevelDecode ThroughputCompression RatioEncode Throughput
0🚀 Higher📉 Slightly Lower↔️ Similar
1 (Default)📉 Slightly Lower🚀 Higher↔️ Similar

📊 Performance Benchmarks

Test Environment

  • Hardware: Intel(R) Core(TM) i7-14650HX (@2.2 GHz) with Turbo disabled.
  • Tooling: A customized fork of lzbench.

Dataset 1: silesia.tar

Sorted by decompression velocity.

CodecLevelRatioDecompress SpeedTime (s)
misa77-054.5 MB/s5219 MB/s42.64
misa77-151.2 MB/s4274 MB/s39.65
zxc-3115 MB/s2841 MB/s45.46
zxc-480.8 MB/s2726 MB/s42.63
lzsse8fast—183 MB/s2661 MB/s44.80
zxc-548.6 MB/s2599 MB/s40.25
lz4hc-127.31 MB/s2531 MB/s36.45
lzsse4fast—186 MB/s2522 MB/s45.26
lz4—371 MB/s2505 MB/s47.59
lizard-10320 MB/s2452 MB/s48.79
zstd-1297 MB/s901 MB/s34.54
snappy—375 MB/s855 MB/s47.89

Dataset 2: enwik8

CodecLevelRatioDecompress SpeedTime (s)
misa77-038.7 MB/s4802 MB/s48.59
misa77-140.6 MB/s4134 MB/s44.05
zxc-370.1 MB/s2674 MB/s52.05
zxc-538.7 MB/s2627 MB/s46.85
zxc-452.7 MB/s2593 MB/s48.60
lzsse4fast—141 MB/s2581 MB/s47.11
lzsse8fast—135 MB/s2553 MB/s47.25
lizard-10240 MB/s2462 MB/s57.31
lz4—276 MB/s2355 MB/s57.26
lz4hc-129.89 MB/s2167 MB/s41.91
zstd-1225 MB/s831 MB/s40.66
snappy—240 MB/s568 MB/s55.93

🔍 Deep Dive & Analysis

Because misa77's performance varies based on data "shape," a file-by-file analysis of the Silesia corpus reveals the following:

1. Comparison with LZ4

  • Dominance: At level 0, misa77 outperforms lz4 on 11 out of 12 files.
  • The Exception: The x-ray file is highly incompressible. In this case, lz4 essentially performs a memcpy, making it the faster option.

2. The Pareto Frontier

When plotting Throughput vs. Ratio, misa77 consistently sits on the Pareto frontier for compressible data. It provides the fastest decompression while matching or exceeding the ratios of other high-speed LZ codecs. (Exceptions include sao and x-ray).

3. Portability and Vectorization

While the x86-64 path is highly optimized, other architectures utilize a portable path.

  • No explicit intrinsics are used in the portable path.
  • Auto-vectorization: The code is written to be easily optimized by modern compilers.

Cross-platform results for v0.1.0 are available →\rightarrow→ Note: These are likely outdated; refer to current v0.2.0 benchmarks.

Performance Graph Placeholder

Implementation Detail

The core logic is contained within the src/ directory, with experimental modes located in: src/experimental/ →\rightarrow→ These modes further explore the relationship between compression effort and CPU microarchitecture efficiency.