Skip to content

Gleipnir 1.0.0

Choose a tag to compare

@ValisSowilo ValisSowilo released this 29 Aug 12:04
· 48 commits to main since this release

Gleipnir is a context-mixing lossless compressor and archiver in one C file. It
predicts each bit with 27 statistical models, blends them with a learned mixer,
and codes the result with an arithmetic coder. There is no dictionary in the
output at all.

New here? Download and install instructions are in the README — plain numbered steps for Windows and Linux.

Formerly released as Nyx; renamed to Gleipnir. The on-disk format is unchanged (archive version v2), so archives written by Nyx 1.0.0 still read.

Silesia

211,938,580 bytes, one machine, single thread, every gleipnir row round-trip
verified against its SHA-256.

                      total       ratio     bpc     comp     decomp          peak
gleipnir -9           35,582,296       5.96x   1.343     597s       672s       1055 MB
gleipnir -7           36,493,092       5.81x   1.377     451s       467s        922 MB
gleipnir -5           38,273,415       5.54x   1.445     337s       342s        483 MB
zpaq -m5         39,113,069       5.42x   1.476     559s       582s      839 MB *
gleipnir -3           39,510,297       5.36x   1.491     248s       248s        305 MB
lpaq1 -6         43,006,234       4.93x   1.623     173s       186s      199 MB *
gleipnir -1           43,207,157       4.91x   1.631     139s       139s        196 MB
xz -9e           48,456,100       4.37x   1.829     114s         2s      509 MB *

Codecs marked * do not report their own peak RSS, so those figures are sampled
at 50 ms and are a lower bound. Do not read them as equals. The peak column is
compression; decompression peaks 37-40 MB higher at every preset.

Two things worth saying first

Decompression costs the same as compression, because the decoder runs the same
model. That is inherent to context mixing and it is why this is not a
general-purpose tool.

-7 is unstable in time. Across sessions it has read anywhere from 404 to 492
seconds with byte-identical output, so its speed claim carries a range of
1.21-1.28x rather than a single number.

Integrity

The gate is that for any input, damaged or not, Gleipnir either exits 0 with
byte-exact output or exits non-zero with a diagnostic.

  • 648 round trips, all exact
  • 60 round trips across 6 thread counts, all exact
  • 300 randomized corruption trials across 7 damage models: no crash, no hang,
    and no case of exit 0 with wrong output

CI builds and fuzzes on Linux and Windows, and verifies that an archive written
on Linux reads on Windows.

Downloads

gleipnir-1.0.0-setup.exe      226eec2f45a1b7c6d86aa2e9e1d3349f317bcf479b232d70f72492e0c1080f4e
gleipnir.exe                  2359a1060c216e677a4a06dbd23e33fec6583bfed8806a1e4d2b8460af55ef68
gleipnir-windows-x86_64.zip   84d45231f42cf2060f769ea17b32d02d8ba74963dfc7c1caaff1c312b9bdd51d
gleipnir-linux-x86_64         3bcc359036cdfb87467845b5e696af05fd419dca52f5e57963148b164ef198d6

Every binary here is the unmodified artifact from the CI run for this commit, so each hash is checkable against that run.

  • gleipnir-1.0.0-setup.exe — Windows one-click installer (recommended). Double-click, click through, done: it adds gleipnir to your PATH and adds Compress with Gleipnir to the File Explorer right-click menu (and Extract / Verify / List on .gl files). Per-user, so no administrator prompt. Not code-signed, so SmartScreen warns the first time: More info → Run anyway.
  • gleipnir.exe — the whole program in one file, no installer. Statically linked, KERNEL32 and the UCRT only, so it runs on Windows 10 and later with nothing else.
  • gleipnir-windows-x86_64.zip — the same gleipnir.exe plus a script install (install.ps1) for people who would rather not run an unsigned installer.
  • gleipnir-linux-x86_64 — statically linked, so it runs on any x86-64 Linux with nothing to install — no glibc version requirement and no libz.so.1 on the system. chmod +x it and go.

The binaries are built -march=x86-64-v2 (SSE4.2/POPCNT, any x86-64 CPU from roughly 2009 on), never -march=native.

Licence

GPL-3.0-or-later. Gleipnir was first published under the Business Source License 1.1
with a Change Date of 2030-08-04; that conversion has been brought forward.

The engine's lineage is PAQ, ZPAQ and lpaq. Bit-history states, logistic mixing
in the stretched domain, ISSE chains and SSE/APM refinement are all from Matt
Mahoney's work. No PAQ code is used here, but the ideas are not mine.