Hawkynt

LZFX

Improved LZF variant with better compression ratios while maintaining high speed. Uses hash-based LZ77 matching with 13-bit offset encoding and simple token format. Designed for applications requiring fast compression with minimal memory overhead.

Properties

Property Value
Category Compression Algorithms
Sub-category Dictionary
Security status Not classified
Complexity Intermediate
Inventor Andrew Collette
Year 2008
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/compression/lzfx.js

Security

Status: not classified β€” treat as unverified.

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

6 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” All literals - no compression

Field Value
input 41424344
expected 040000000341424344

Vector 2 β€” Repetition - AAAA

Field Value
input 41414141
expected 0400000000412000

Vector 3 β€” Long repetition - 10 A’s

Field Value
input 41414141414141414141
expected 0a0000000041e00000

Vector 4 β€” Pattern repetition - ABCABCABC

Field Value
input 414243414243414243
expected 09000000024142438002

Vector 5 β€” Long text compression

Field Value
input 48656c6c6f20576f726c64212048656c6c6f20576f726c6421
expected 190000000c48656c6c6f20576f726c642120e0030c

Vector 6 β€” Highly repetitive data

Field Value
input 42424242424242424242424242424242 42424242424242424242424242424242 42424242424242424242424242424242 42424242424242424242424242424242 42424242424242424242424242424242 42424242424242424242424242424242 42424242
expected 640000000042e05a00

← All algorithms