Crinkler
Introduction
Crinkler is an executable file compressor (or rather, a
compressing linker) for Windows specifically targeted towards
executables with a size of just a few kilobytes. As of 2015, it is the
most widely used tool for compressing 4k intros.
Crinkler is being developed by Rune L. H. Stubbe (Mentor/TBC)
and Aske Simon Christensen (Blueberry/Loonies).
History
- 28.07.15: Version 2.0 released, now with special 1k features!
/TINYHEADER option: smaller decompressor for 1k intros (much slower decompression and with slightly worse compression ratio).
/TINYIMPORT option: smaller import code for 1k intros (somewhat less robust to future DLL changes).
/EXPORT option to export code and data symbols. Can be used to request the high-performance GPU on a dual GPU system.
/SATURATE option to saturate context counters. Better for very redundant data.
/FALLBACKDLL option for when a DLL is not available.
/UNALIGNCODE option to set alignment of all code to 1.
Support for /REPLACEDLL during recompression.
New, collision-free hashing for estimation and reordering.
Gives consistent sizes between model estimation and reordering and on average slightly better compression, though with some variation.
Header size reduced by 2 bytes.
Print previous size of output file.
Accept version specifier after /SUBSYSTEM value (Visual Studio XP compatibility mode).
Switched from the Intel compiler and OpenMP to the VS 2013 compiler and the MS concurrency API.
- 19.01.13: Version 1.4 released.
Output EXE files now have an empty export table pointer,
fending off hooks which dig into the export table of every
lauched executable. This solves the crash problems seen
with some recent NVIDIA drivers.
New zero-section header layout, better use of header space
and optimizations to the decompression and import code, together
saving typically around 30-50 bytes.
Forwarded RVA imports are supported by forwarding the import
during linking.
Dynamic C++ initializers are supported.
Support for producing Large Address Aware executables.
Crinkler is itself Large Address Aware, thus being able to
handle larger inputs than before.
Crinkler reports all unresolved symbols, rather than stopping
after the first one.
For each unresolved symbol reported, the object file referencing
the symbol is indicated.
When there is a reference to a label at the start of a section,
the report will show the reference to the label rather than the
section.
Compressed sizes are printed with decimals for more accurate
size assessment.
The names of loaded files are printed on separate lines to better
show the progress when some files take long to load.
/RECOMPRESS overwrites input file by default.
Some updates to the license: less restictive distribution terms,
more restrictive usage terms.
Updated installation description in the manual to describe
integration into Visual Studio 2010 or newer.
New section in the manual about the compatibility strategy of
Crinkler.
- 05.03.11: Version 1.3 released.
Fixed long-standing crash bug on some multi-core AMD systems.
Header size reduced by 21 bytes, thanks to optimizations suggested
by Řrřola.
Slightly improved model hash function.
/OVERRIDEALIGNMENTS option to specify label alignments.
No limit on the number of calls in call transform.
Import code and entry point movable by section reordering.
Fixed bug in handling of files with absolute path.
Fixed labels in report sometimes showing up in the wrong section.
Crinkler writes .dmp files with execution state information in case of a crash.
- 05.09.09: Version 1.2 released.
Decompression header and import code reworked to make output
executables Windows 7 compatible.
Due to incompatibilities between the loading mechanisms of Windows 7
and Windows 2000 (and general Windows 2000 weirdness), Windows 2000
compatibility is lost.
New header is 16 bytes smaller.
Non-range import code is (usually) slightly smaller.
Slightly improved section ordering estimation.
/RECOMPRESS option to recompress Crinkler-compressed
executables, optionally with different parameters.
/FIX removed, as it is subsumed by /RECOMPRESS.
- 14.01.09: Version 1.1a released.
Fixed /TRUNCATEFLOATS crashing in some cases.
Improved section ordering estimation of /ORDERTRIES when call transform is used.
Sometimes identically named sections from different object files were misplaced in the HTML report.
Various improvements to the HTML report.
The /FIX option can input and output to the same file.
Helpful error messages when Crinkler detects that an unsupported
feature of the Visual Studio compiler is used.
Prefer a custom entry point to a standard library one.
New section in the manual about how to use the standard C runtime
libraries with Crinkler.
- 12.01.08: Version 1.1 released.
Support for weak externals (virtual C++ destructors).
Output EXE files are now compatible with Data Execution Prevention.
/REPORT option to get an HTML compression report showing detailed
compression ratios for every byte of code or data.
/TRUNCATEFLOATS option to truncate float constants to a specified
number of bits.
/SAFEIMPORT is now default, disabled with /UNSAFEIMPORT.
Slightly smaller import code overhead if range importing is not used.
Fixed some crash problems with compressing very small files.
/VERBOSE:FUNCTIONS removed, as it is subsumed by /REPORT.
Remaining /VERBOSE options renamed to /PRINT to avoid conflict with
the /VERBOSE options of the Visual Studio linker.
Maximum number of ORDERTRIES increased to 100000, for those who
really have lots of patience.
- 07.01.07: Version 1.0a released.
New /VERBOSE:FUNCTIONS options to sort the functions.
Various verbose output fixes.
Various crash fixes.
A fix to the /FIX Crinkler version recognizer.
- 27.12.06: Version 1.0 released with lots of new features!
Output EXE files are now Windows Vista compatible.
Compression tweak for greatly improved compression ratio.
Much faster compression.
Automatically takes advantage of multiple processors.
Improved Visual Studio 2005 integration.
/COMPMODE:INSTANT option for very quick compression.
/ORDERTRIES option to try out different section orderings.
/SAFEIMPORT option to insert a check for nonexisting DLLs.
/PROGRESSGUI option for a graphical progress bar.
/REPLACEDLL option to replace one DLL with another.
/FIX option to fix compatibility problems of older versions.
- 09.02.06: Version 0.4a released:
Fixed linker crash problem with blank member entries
in some library files (such as glut32).
The /PRIORITY option was not mentioned in the
commandline usage help.
- 18.12.05: Version 0.4 released:
Changed header and import code to make output EXE files
compatible with 64-bit versions of Windows.
Fixed a bug in the ordinal range import mechanism.
Added a switch to control the process priority.
Added a warning for range import of an unused DLL.
Some more header squeezing.
- 31.10.05: Version 0.3 released:
Output EXE files are now Windows 2000 compatible.
Added a number of verbose options to output useful
information about the program being compressed.
Added an option for transforming function calls to
use absolute offsets to improve compression.
Fixed a bug in the linker regarding identically named
sections.
Fixed a potential crash bug in the linker.
Various small tweaks and optimizations.
- 23.07.05: Version 0.2 released:
Fixed bug in the decompressor.
Changed the behaviour of the /CRINKLER option.
Added timing to the progress bars.
Some updates to the manual and usage description.
- 21.07.05: Version 0.1 released.
Download
Crinkler is free (as in beer).
Download the newest version of Crinkler (2.0)
here.
Support
You can help us make Crinkler a better piece of software. We are
currently very interested in:
- Feedback: Any problems, comments or suggestions? Tell us
what you think about Crinkler in the Pouet.net
forum.
- Test data: Send us the object files of your uncompressed
4k intros (preferrably a release version). This will help us a lot in
testing the program. See the manual for contact information.
- Bug reports: If Crinkler does not work with your intro or
in your system, tell us about it and (if possible) include the object
files and/or code you tried to compress.