LZ77 compressor for 8-bit targets designed by Einar Saukas. Uses only three block types (literal, last-offset match, new-offset match) distinguished by a single context-dependent bit, with interlaced Elias gamma coding for offsets and lengths.
| Property | Value |
|---|---|
| Category | Compression Algorithms |
| Sub-category | Dictionary-based |
| Security status | Not classified |
| Complexity | Advanced |
| Inventor | Einar Saukas |
| Year | 2021 |
| Origin | 🇧🇷 Brazil |
| Source | algorithms/compression/zx0.js |
Status: not classified — treat as unverified.
No vulnerabilities are recorded for this implementation.
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — Empty input
| Field | Value |
|---|---|
input |
(empty) |
expected |
00000000 |
Vector 2 — Highly repetitive input (64 ‘A’ bytes)
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
41414141414141414141414141414141 41414141414141414141414141414141 41414141414141414141414141414141 41414141414141414141414141414141 |
expected |
(empty) |
Vector 3 — Text sample
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
74686520717569636b2062726f776e20 666f78206a756d7073206f7665722074 6865206c617a7920646f672e20746865 20717569636b2062726f776e20666f78 2e |
expected |
(empty) |
Vector 4 — Repetitive text beyond a single maximum-length match (90 KB)
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
74686520717569636b2062726f776e20 666f78206a756d7073206f7665722074 6865206c617a7920646f672e20746865 20717569636b2062726f776e20666f78 … (90000 bytes; the full value is in the source) |
expected |
(empty) |