A compressor 1.75x faster than lz4, and blind to bit flips
zstd vs lz4, re-run with misa77 on an AMD EPYC: misa77 level 3 decoded 6,558 MB/s, lz4 3,758, zstd -3 1,177. Its files have no checksum, so check your own.
By Meet ModiI flipped one bit in a misa77 file 300 times. 251 of those files decompressed with exit code 0 and handed back the wrong bytes. The same test on a default zstd file: 300 out of 300 caught. That is not a bug in misa77's decoder, which never crashed once. It is a format with no checksum, and the docs say otherwise.
The speed claims mostly hold up. misa77 hit the Hacker News front page today as a new LZ compressor that decodes "roughly 2 times faster" than lz4 and zstd at similar ratios. On zstd vs lz4 itself, the short answer has not changed: lz4 decompresses about three times faster, zstd makes files about a third smaller. I re-ran the misa77 README benchmark on a different CPU with the same harness, lzbench, to see where the new one fits between them.
What misa77 claims
misa77 is an LZ77-family compressor for "the write-once, read-many niche": you compress once, slowly, and decompress many times, fast. Version 0.9.0 landed on November 30, MIT licensed, C++20 with hand-written assembly decoders for x86-64 and ARM64. It comes as two families that lzbench lists as separate codecs:
- Levels 1 to 6 (misa77): plain LZ, no entropy coding. The competitors are lz4 and lz4hc.
- Levels 11 to 13 (misa77ec): LZ plus entropy coding and "some other tricks". The competitors are zstd and brotli.
The README's numbers come from one Intel i7-14650HX with turbo off, pinned to a single core. It also says plainly that the format "may change unexpectedly as it's still v0.x.y", and that the decoder is "guaranteed to be safe in the case of corrupt/malicious input". It credits five Claude models for help along the way, which is more candour than most READMEs manage.
zstd vs lz4 vs misa77: the benchmark on Silesia
Setup: a GitHub Actions runner, AMD EPYC 7763, GCC 15.2, lzbench 2.4.2 built from master, which already bundles misa77 0.9.0, lz4 1.11.0 and zstd 1.6.0. Input: silesia.tar, the usual 212 MB mixed corpus. One core pinned with taskset, 3 seconds of decompression per codec. Ratio is compressed size as a percentage of the original, so lower is smaller. I ran it twice and the decode numbers moved by under 2%. (Same habit as re-running Laravel's 18x benchmark: a claim measured on one machine is a claim about that machine.)
sudo nice -n -10 taskset -c 1 ./lzbench -o1 -t1,3 \
-ememcpy/misa77,2,3,4/misa77ec,11,12,13/lz4/lz4hc,9,12/zstd,1,3,9,15,19/zstd_fast,-1 \
silesia.tarlzbench 2.4.2 | GCC 15.2.0 | 64-bit Linux | AMD EPYC 7763 64-Core Processor
| Compressor name | Compression | Decompress. | Ratio |
| misa77 0.9.0 -2 | 229 MB/s | 5595 MB/s | 44.28 |
| misa77 0.9.0 -3 | 95.7 MB/s | 6558 MB/s | 42.59 |
| misa77 0.9.0 -4 | 61.8 MB/s | 5836 MB/s | 40.33 |
| misa77ec 0.9.0 -11 | 36.9 MB/s | 2421 MB/s | 27.40 |
| misa77ec 0.9.0 -12 | 7.88 MB/s | 2466 MB/s | 25.83 |
| misa77ec 0.9.0 -13 | 1.76 MB/s | 2651 MB/s | 24.81 |
| lz4 1.11.0 | 607 MB/s | 3758 MB/s | 47.32 |
| lz4hc 1.11.0 -9 | 28.2 MB/s | 3607 MB/s | 36.75 |
| lz4hc 1.11.0 -12 | 11.0 MB/s | 3728 MB/s | 36.45 |
| zstd 1.6.0 --fast=1 | 334 MB/s | 1787 MB/s | 41.01 |
| zstd 1.6.0 -1 | 319 MB/s | 1299 MB/s | 34.53 |
| zstd 1.6.0 -3 | 203 MB/s | 1177 MB/s | 31.20 |
| zstd 1.6.0 -9 | 53.3 MB/s | 1261 MB/s | 27.87 |
| zstd 1.6.0 -15 | 7.13 MB/s | 1317 MB/s | 26.83 |
| zstd 1.6.0 -19 | 2.65 MB/s | 1152 MB/s | 24.93 |A small trap if you try this: lzbench wants the codec list glued to the flag, -e<list>. With a space it reads the list as a file name and prints "NOT FOUND: (null)", which cost me one run.
zstd vs lz4 decompression speed and ratio
Leave misa77 out for a second, because this is the comparison most people searching are after. lz4 decoded at 3,758 MB/s and kept 47.3% of the input. zstd -3, the default level, decoded at 1,177 MB/s and kept 31.2%. So lz4 is about 3.2x faster to decompress, and zstd's output is about a third smaller. lz4 also compresses three times faster (607 vs 203 MB/s).
The detail people miss is how flat zstd's decode speed is across levels: 1,299 MB/s at -1, 1,261 at -9, 1,317 at -15, 1,152 at -19. Higher levels cost you compression time, not decompression time. If you compress once and read often, a high zstd level is close to free on the read side. lz4hc is the same story for lz4: level 12 decoded at 3,728 MB/s, as fast as plain lz4, with files about a quarter smaller.
Where misa77 lands
- Against lz4: level 3 decoded 6,558 vs 3,758 MB/s, 1.75x faster, and smaller (42.6% vs 47.3%). The README's Intel run had 2.32x.
- Against lz4hc -9: 1.82x faster to decode, but lz4hc's file is smaller (36.8% vs 42.6%). misa77 level 4 closes some of that gap at 40.3%.
- Against zstd: level 11 vs zstd -9 is 2,421 vs 1,261 MB/s at 27.4% vs 27.9%, so 1.92x. Level 13 vs zstd -19 is 2,651 vs 1,152 at 24.8% vs 24.9%, so 2.30x.
So, slower than advertised, still fast. Two reasons it differs from the README, and neither makes the README wrong: a different CPU, and a newer zstd. The README compares against zstd 1.5.7 at 976 MB/s for -11. lzbench now ships zstd 1.6.0, which decoded -9 at 1,261 here.
In 64 KiB blocks
Databases, game engines and caches rarely decompress a 212 MB stream. They decompress small blocks independently. lzbench's -b64 option cuts the input into 64 KiB pieces:
| Compressor name | Compression | Decompress. | Ratio |
| misa77 0.9.0 -3 | 94.3 MB/s | 6076 MB/s | 46.09 |
| misa77ec 0.9.0 -11 | 20.6 MB/s | 1921 MB/s | 33.15 |
| lz4 1.11.0 | 533 MB/s | 2957 MB/s | 47.98 |
| lz4hc 1.11.0 -9 | 43.1 MB/s | 3556 MB/s | 40.39 |
| zstd 1.6.0 -1 | 382 MB/s | 1161 MB/s | 36.19 |
| zstd 1.6.0 -9 | 54.3 MB/s | 1142 MB/s | 32.49 |misa77 level 3 holds up best here: 2.05x lz4's decode speed. The entropy level loses ground. At 64 KiB, zstd -9 makes smaller output than misa77ec -11 (32.5% vs 33.2%), and misa77ec -11 compression drops to 20.6 MB/s.
The catch: no checksum, and the docs say otherwise
misa77's CLI file format is four bytes of magic, one byte of version, and the stream. Its docs say: "The stream itself is decoded in safe mode, so a corrupt or truncated file is rejected with an error instead of being misdecoded." Truncation is caught. I cut a file at 2 MB and got "decompression failed (corrupt or truncated stream)", exit 1. Bit flips are another matter. I compressed Dickens (10 MB of text from the Silesia set) at levels 3, 11 and 13, flipped one random bit 300 times per file, and decompressed each one:
file rejected wrong data, exit 0 crashed
misa77 level 3 49 251 0
misa77 level 11 75 225 0
misa77 level 13 75 225 0
zstd -3 (default) 300 0 0
zstd -3 --no-check 94 206 0
lz4 -9 (CLI frame) 300 0 0Read that two ways. The good one: 900 corrupted inputs, zero crashes. The decoder does what its safety claim says, and lzbench's changelog notes that misa77 decompression is now always bounds-checked. That is a small sample, not a fuzzing campaign, but it is a decent first look. The bad one: most corruption is not detected at all. zstd with --no-check behaves the same way, because this is what any LZ stream without a checksum does. The difference is that zstd and the lz4 CLI turn the checksum on by default, and it costs zstd 4 bytes per file. Silent wrong output is worse than a crash, the same way a retry that hides a failure is worse than an error.
If you use misa77 through its library, store a hash next to each blob (xxHash, CRC32C, whatever your stack already has) and check it after decompressing.
What I'd wait on before shipping misa77
- Format stability. 0.x can change without warning, and it already has: files from the old 0.4 to 0.6 heavy format are rejected by current builds. Fine for a cache you can rebuild. Not fine for an archive.
- Compression cost. Level 3 compresses at 96 MB/s against lz4's 607. Level 13 at 1.76 MB/s took 11.7 s for Dickens alone and peaked at 123 MB of memory.
- Ecosystem. lz4 and zstd ship in the Linux kernel, ZFS, Kafka and Postgres, with bindings for most languages. misa77 is a C++ library, a CLI and two benchmark harnesses.
- Independent hardening. The README says "broader hardening is ongoing". My 900 flips are not a substitute for a long fuzzing run.
Which to pick: zstd, lz4, or misa77
- Default choice, or data that goes over a network or to disk you pay for: zstd. Pick the level by how much compression time you can spend, since decode speed barely changes.
- Decompression CPU is your bottleneck and size matters less: lz4, or lz4hc at a high level if you compress once.
- Read-many data you build yourself and can regenerate, like game assets or a build cache: misa77 level 3 or 11 is worth a benchmark on your own data, with your own checksum around it.
Is zstd or lz4 faster?
lz4 is faster at both compressing and decompressing. On one AMD EPYC 7763 core with the Silesia corpus, lz4 decompressed at 3,758 MB/s and zstd at its default level 3 at 1,177 MB/s, about 3.2x slower. lz4 also compressed three times faster. zstd makes up for it with output about a third smaller.
Does zstd compress better than lz4?
Yes, noticeably. On Silesia, lz4 output was 47.3% of the original and zstd level 3 was 31.2%, so zstd files were about a third smaller. lz4hc closes part of the gap at 36.5% for level 12, but even zstd level 1, at 34.5%, beats it while still compressing at over 300 MB/s.
Does the zstd level change decompression speed?
Barely. In my run zstd decoded at 1,299 MB/s at level 1, 1,261 at level 9, 1,317 at level 15 and 1,152 at level 19. Higher levels make compression much slower, from 319 MB/s down to 2.65 MB/s, but reading the data back costs about the same. For data written once and read often, high levels are cheap.
What is the fastest decompression algorithm?
Among general-purpose LZ codecs I tested, misa77 0.9.0 level 3 decoded fastest at 6,558 MB/s on one AMD EPYC core, against 3,758 MB/s for lz4. It is a new 0.x project with a format that may still change. Among mature, widely deployed options, lz4 and lz4hc are the fastest to decompress.
Is misa77 faster than zstd?
At decompression, yes, by about 1.9x to 2.3x at matching sizes in my run. misa77 level 11 decoded at 2,421 MB/s against zstd -9 at 1,261, with nearly the same output size. Compression is a different story: level 13 ran at 1.76 MB/s, slower than zstd -19, and in 64 KiB blocks zstd -9 produced smaller output.
Does misa77 have a checksum?
No. The .misa77 file has a four byte magic and a version byte, and no checksum. Truncated files are rejected, but in my test 251 of 300 single bit flips at level 3 decoded with exit code 0 into wrong data. The decoder never crashed. Store your own hash next to the data if correctness matters.
- misa77 README, benchmarks and format docs (0.9.0), misa77
- misa77 CLI container format, misa77
- lzbench, in-memory benchmark of open-source compressors, lzbench
- Silesia compression corpus, Silesian University of Technology
- Zstandard, Meta
- LZ4, LZ4
More Posts
ssh-keygen now makes P-384 keys by default, and EC2 won't take them
OpenSSH's ssh-keygen now makes ECDSA P-384 keys when you skip -t. GitHub, GitLab and Bitbucket accept them. EC2 key pairs and FIDO keys don't.
Redis TLS clients hang at connection 1024, and plain TCP never notices
Redis 8.0 to 8.12.0 with TLS can leave a client stuck in the handshake once the server passes 1024 connections. Fixed in 8.12.1, 8.10.4 and four more.
Chrome is about to distrust the CA that signs google.com
Chrome stops trusting ECDSA P-256 CA keys on March 15, 2027. Google Trust Services WE1 and WE2 are P-256, and 146 of 770 top sites I scanned chain to one.