Universal Compression Library implementing NRV2B algorithm. LZ77-based compression with a bit-packed 32-bit little-endian stream, offering better compression than LZO while maintaining fast decompression speed. Used extensively in UPX executable packer.
| Property | Value |
|---|---|
| Category | Compression Algorithms |
| Sub-category | Dictionary-based |
| Security status | 🎓 Educational Only |
| Complexity | Intermediate |
| Inventor | Markus F.X.J. Oberhumer |
| Year | 2004 |
| Origin | Not specified |
| Source | algorithms/compression/ucl.js |
Status: 🎓 Educational Only
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
| Field | Value |
|---|---|
input |
(empty) |
expected |
00000000 |
Vector 2 — Single byte ‘A’
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
41 |
expected |
(empty) |
Vector 3 — Hello World
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
48656c6c6f20576f726c64 |
expected |
(empty) |
Vector 4 — Repeated pattern AAABBBCCC
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
414141424242434343 |
expected |
(empty) |
Vector 5 — Lorem ipsum text
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
4c6f72656d20697073756d20646f6c6f722073697420616d6574 |
expected |
(empty) |
Vector 6 — Large repetitive block (1200x ‘A’) - regression for match-length overflow
| Field | Value |
|---|---|
roundTripOnly |
Yes |
input |
41414141414141414141414141414141 41414141414141414141414141414141 41414141414141414141414141414141 41414141414141414141414141414141 … (1200 bytes; the full value is in the source) |
expected |
(empty) |