kkrunchy compresses a Windows executable after it has been linked. Its author, Fabian Giesen, known as ryg of farbrausch, designed it for 64K intros: demo productions whose complete executable must fit a fixed size limit.
That purpose shaped its compromises. Giesen’s tool page describes slow unpacking and unsupported executable features, including exports and thread-local storage. It was specialised equipment for size coding, rather than a general way to shrink every Windows program.
Make similar bytes neighbours
In his 2011 account, Giesen explained a reversible transformation of x86 instructions. An instruction can contain an operation, information about its operands, an address or a constant. kkrunchy separates such components into streams, bringing bytes with similar jobs together before compression.
The decompressor reverses the transformation to recover the instructions. Giesen related the approach to the split-stream method in the PPMexe research paper; he did not present instruction-aware compression as an idea without predecessors.
He also distinguished two generations of kkrunchy: an earlier LZ77-based compressor with an arithmetic-coding stage, and a later context-mixing design. A more capable compression model costs more decoder code, a trade-off that matters when the decoder itself counts towards the limit.
Measure the delivered program
The historical tool page describes an analysis mode which uses debugging or map information to estimate the packed cost of functions and data. Those figures are estimates: compression works across boundaries, and transformed instructions do not map neatly back to individual original bytes.
farbrausch published two kkrunchy source trees in its April 2012 tools release, alongside editors, engines and music software. The packer was one part of how generated content became small executables, including debris.. Crinkler approaches smaller intros by combining compression with the linking stage itself.
Sources
- Fabian Giesen, kkrunchy documentation: Historical author-maintained tool page; 64K purpose, code transform, version differences and analysis limits.
- Fabian Giesen, x86 code compression in kkrunchy: 24 January 2011 retrospective by its author; two compression generations and the instruction-stream transform.
- farbrausch, original tools source release README: April 2012 source release; two kkrunchy code trees and contributor list, with licences stated per project.