Repository navigation
First release of hp, a lossless compressor with two modes.
Highlights
hp c -9(default): context mixing. 38,982,429 bytes on Silesia, 20.1% smaller than xz -9, and smaller than every tool tested on every file. Slow, at about 0.2 MB/s, and needs about 1.1 GB of RAM.hp c -1: LZ77 with an adaptive range coder. 11.2% smaller than gzip -6 and faster to compress. zstd -9 is still ahead of it.- Every benchmark number passes a byte-exact SHA-256 round-trip check. Corrupt input is rejected with exit code 2, and nothing is written.
Changes since the initial commit
- Windows portability: the same-file guard now uses the Win32 file index, because
st_inois always 0 on Windows. Lengths in the x86 filter are now 64-bit. Linux output is unchanged. - Second-machine results (Core Ultra 9 285H, WSL2) are in the README, including the strict timing test that failed on that throttled laptop.
- One-command benchmark, CI with ASan/UBSan fuzzing, chart, and MIT license.
Downloads
Tested on Windows 11 and Linux: both modes round-trip byte-exact, and the same-file guard works on both.
| File | Platform | Built with |
|---|---|---|
hp-linux-x86_64 |
any x86-64 Linux, statically linked | gcc -O3 -static |
hp-windows-x86_64.exe |
64-bit Windows, statically linked | x86_64-w64-mingw32-gcc -O3 -static |
Neither binary uses -march=native, so CRC32C runs on the portable table path. The .hp files are identical to those from a native build. Usage: hp c [-1|-9] in out, hp d in out.
SHA-256:
16f724215e5acc557cbe3ec7365013d33a98eb45b4386547856797d86b1621ba hp-linux-x86_64
e6713b2ff3c045978369bf375b73820770e3f59ba63681cc834c6336b78fe1eb hp-windows-x86_64.exe