LZ77 dictionary matching followed by canonical Huffman entropy coding, after Zhang Liβs libzling. A bounded hash-chain parser emits flag-byte grouped literal and match tokens; the resulting byte stream is Huffman coded with code lengths limited to 15 bits.
| Property | Value |
|---|---|
| Category | Compression Algorithms |
| Sub-category | Dictionary-based |
| Security status | Not classified |
| Complexity | Advanced |
| Inventor | Zhang Li (richox) |
| Year | 2013 |
| Origin | π¨π³ China |
| Source | algorithms/compression/zling.js |
Status: not classified β treat as unverified.
No vulnerabilities are recorded for this implementation.
6 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Empty input - header only
| Field | Value |
|---|---|
input |
(empty) |
expected |
00000000 |
Vector 2 β Single byte
| Field | Value |
|---|---|
input |
41 |
expected |
01000000020000000100000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 β¦ (265 bytes; the full value is in the source) |
Vector 3 β Two different bytes
| Field | Value |
|---|---|
input |
4142 |
expected |
02000000030000000200000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 β¦ (265 bytes; the full value is in the source) |
Vector 4 β Simple repetition AAAA
| Field | Value |
|---|---|
input |
41414141 |
expected |
04000000050000000202020000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 β¦ (266 bytes; the full value is in the source) |
Vector 5 β Pattern ABAB
| Field | Value |
|---|---|
input |
41424142 |
expected |
04000000050000000200000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 β¦ (265 bytes; the full value is in the source) |
Vector 6 β Hello string
| Field | Value |
|---|---|
input |
48656c6c6f |
expected |
05000000060000000300000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 β¦ (266 bytes; the full value is in the source) |