Jump to content

Executable compression

From Wikipedia, the free encyclopedia
Revision as of 21:07, 5 July 2026 by ~2026-38414-79 (talk) (→Portable Executable: Make the table less jarring in dark mode)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:RedirTemplate:More citations needed Template:Use dmy dates Template:Use list-defined references Executable compression is any means of compressing an executable file and combining the compressed data with decompression code into a single executable. When this compressed executable is executed, the decompression code recreates the original code from the compressed code before executing it. In most cases this happens transparently so the compressed executable can be used in exactly the same way as the original. Executable compressors are often referred to as executable packers, runtime packers, software packers, software protectors, or even "polymorphic packers" and "obfuscating tools".

A compressed executable can be considered a self-extracting archive, where a compressed executable is packaged along with the relevant decompression code in an executable file. Some compressed executables can be decompressed to reconstruct the original program file without being directly executed. Two programs that can be used to do this are CUP386 and UNP.Template:Fact

Most compressed executables decompress the original code in memory and most require slightly more memory to run (because they need to store the decompressor code, the compressed data and the decompressed code). Moreover, some compressed executables have additional requirements, such as those that write the decompressed executable to the file system before executing it.

Executable compression is not limited to binary executables, but can also be applied to scripts, such as JavaScript. Because most scripting languages are designed to work on human-readable code, which has a high redundancy, compression can be very effective and as simple as replacing long names used to identify variables and functions with shorter versions and/or removing white-space.

Advantages and disadvantages

Software distributors use executable compression for a variety of reasons, primarily to reduce the secondary storage requirements of their software; as executable compressors are specifically designed to compress executable code, they often achieve better compression ratio than standard data compression facilities such as gzip, zip or bzip2.Template:Citation needed This allows software distributors to stay within the constraints of their chosen distribution media (such as CD-ROM, DVD-ROM, or floppy disk), or to reduce the time and bandwidth customers require to access software distributed via the Internet.

Executable compression is also frequently used to deter reverse engineering or to obfuscate the contents of the executable (for example, to hide the presence of malware from antivirus scanners) by proprietary methods of compression and/or added encryption. Executable compression can be used to prevent direct disassembly, mask string literals and modify signatures. Although this does not eliminate the chance of reverse engineering, it can make the process more costly.

A compressed executable requires less storage space in the file system, thus less time to transfer data from the file system into memory. On the other hand, it requires some time to decompress the data before execution begins. However, the speed of various storage media has not kept up with average processor speeds, so the storage is very often the bottleneck. Thus the compressed executable will load faster on most common systems. On modern desktop computers, this is rarely noticeable unless the executable is unusually big, so loading speed is not a primary reason for or against compressing an executable.

On operating systems which page executable images on demand from the disk, compressed executables make this process less efficient. The decompressor stub allocates a block of memory to hold the decompressed data, which stays allocated as long as the executable stays loaded, whether it is used or not, competing for memory resources with other applications all along. If the operating system uses a swap file, the decompressed data has to be written to it to free up the memory instead of simply discarding unused data blocks and reloading them from the executable image if needed again. This is usually not noticeable, but it becomes a problem when an executable is loaded more than once at the same time—the operating system cannot reuse data blocks it has already loaded, the data has to be decompressed into a new memory block, and will be swapped out independently if not used. The additional storage and time requirements mean that it has to be weighed carefully whether to compress executables which are typically run more than once at the same time.

Another disadvantage is that some utilities can no longer identify run-time library dependencies, as only the statically linked extractor stub is visible.

Also, some older virus scanners simply report all compressed executables as viruses because the decompressor stubs share some characteristics with those. Most modern virus scanners can unpack several different executable compression layers to check the actual executable inside, but some popular anti-virus and anti-malware scanners have had troubles with false positive alarms on compressed executables. In an attempt to solve the problem of malware obfuscated with the help of runtime packers the IEEE Industry Connections Security Group has introduced a software taggant system.

Executable compression used to be more popular when computers were limited to the storage capacity of floppy disks, which were both slow and low capacity media, and small hard drives; it allowed the computer to store more software in the same amount of space, without the inconvenience of having to manually unpack an archive file every time the user wanted to use the software. However, executable compression has become less popular because of increased storage capacity on computers. It has its use in the demoscene where demos have to stay within a size limit, e.g. 64k intro. Only very sophisticated compression formats, which add to load time, keep an executable small enough to enter these competitions.

List of executable packers

CP/M and MSX-DOS executable

Known executable compressors for CP/M-80 / MSX-DOS .COM files:

  • PMexe (since 1990, written by Yoshihiko Mino, PMARC.COM+PMEXE.CPM, signature "-pms-")[1]
  • PopCom! (since 1992, written by Yoshihiko Mino, POPCOM.COM, signature "-pc1-")

MS-DOS executable

Known executable compressors for MS-DOS-compatible executable files (.COM or .EXE):

  • Realia Spacemaker (since 1982, written by Robert B. K. Dewar, SM.COM, signature "MEMORY$")[2][3][4][5][6][7][8][9]
  • Microsoft EXEPACK (since 1985, written by Reuben Borman, EXEPACK.EXE, LINK.EXE /E[XEPACK], signature "RB")[9][5][4][10]
  • LZEXE (since 1989, written by Fabrice Bellard, LZEXE.EXE)[11][12]
  • PKWare PKLite (since 1990, written by Phil Katz, PKLITE.EXE)[12][13]
  • DIET (since 1991, written by Teddy Matsumoto, DIET.EXE)[12]
  • TINYPROG (TINYPROG.EXE)
  • RJS Software RJCRUSH (since 1994, written by Roland Skinner, RJCRUSH.EXE)
  • XPA (since 1995, written by JauMing Tseng, XPA.EXE)
  • Ibsen Software aPACK (since 1997, written by Jørgen Ibsen, APACK.EXE)
  • UPX (since 1998, written by Markus F. X. J. Oberhumer and László Molnár)
  • 32LiTE (since 1998, written by Oleg Prokhorov, 32LITE.EXE)
  • Knowledge Dynamics LZW Compressor[14]
  • WWpack (since 1994, written by Piotr Warezak and Rafal Wierzbicki, WWPACK.EXE)
  • 624 (only for .COM files smaller than 25 KB, uses LZW)
  • AINEXE
  • AvPack
  • ComPAck
  • HASP Envelope
  • LGLZ
  • PMWLITE
  • ProPack
  • UCEXE
  • WDOSX
  • XE
  • XPack

OS/2 executable

Known executable compressors under OS/2:

  • NeLite
  • LxLite

New Executable

Known executable compressors for New Executables:

  • PackWin
  • PKWare PKLite (from version 2.01)
  • WinLite

Portable Executable

Known executable compressors for Portable Executables include the following. (Items with a strikethrough decoration are no longer in development.)

Name Last version Released Software license x86-64 support
32Lite Template:Dunno Template:Dunno Template:Dunno Template:Dunno
Alienyze 1.4 Template:Start date Template:Proprietary No
ANDpakk2 Template:Dunno Template:Dunno Template:Dunno Template:Dunno
Armadillo 9.62 Template:Start date Template:Proprietary Yes
ASPack 2.40 Template:Start date Template:Proprietary Yes
ASPR (ASProtect) 2.78 Template:Start date Template:Proprietary Yes
BeRoEXEPacker Template:Dunno Template:Dunno Template:Dunno Template:Dunno
BIN-crypter Template:Dunno Template:Dunno Template:Dunno Template:Dunno
BoxedApp Packer 3.3 Template:Start date Template:Proprietary Yes
CExe 1.0b Template:Start date Template:FreeGPL No
Crinkler 2.3 Template:Start date Template:FreeZlib Yes
dotBundle 1.3 Template:Start date[15] Template:Proprietary Yes
Enigma Protector 6.60 Template:Start date[16] Template:Proprietary Yes
Enigma Virtual Box 9.40 Template:Start date[16] Template:Proprietary Yes
exe32pack Template:Dunno Template:Dunno Template:Dunno Template:Dunno
EXE Bundle 3.11 Template:Start date[17] Template:Proprietary Template:Dunno
EXECryptor Template:Dunno Template:Dunno Template:Dunno Template:Dunno
EXE Stealth 4.14 Template:Start date[17] Template:Proprietary Template:Dunno
eXPressor 1.8.0.1 Template:Start date Template:Proprietary Template:Dunno
FSG 2.0 Template:Start date[18] Template:ProprietaryFreeware No
kkrunchy src 0.23a4 Unknown Template:FreePublic domain No
MEW 1.1 Unknown Template:ProprietaryFreeware No
MPRESS 2.19 Template:Start date Template:ProprietaryFreeware Yes
MuCruncher Template:Dunno Template:Dunno Template:Dunno Template:Dunno
NeoLite Template:Dunno Template:Dunno Template:Dunno Template:Dunno
NsPack Template:Dunno Template:Dunno Template:Dunno Template:Dunno
Obsidium 1.6 Template:Start date[19] Template:Proprietary Yes
PECompact Template:Dunno Template:Dunno Template:Dunno Template:Dunno
PEPack Template:Dunno Template:Dunno Template:Dunno Template:Dunno
PESpin 1.33 Template:Start date Template:ProprietaryFreeware Yes
Petite 2.4 Template:Start date Template:ProprietaryFreeware No
PKLite32 Template:Dunno Template:Dunno Template:Dunno Template:Dunno
RLPack Basic 1.21 Template:Start date Template:FreeGPL No
Shrinker32 Template:Dunno Template:Dunno Template:Dunno Template:Dunno
Smart Packer Pro X 2.0.0.1 Template:Start date Template:Proprietary Yes
Themida/WinLicense 3.2.5.0 Template:Start date Template:Proprietary Yes
Upack Template:Dunno Template:Dunno Template:Dunno Template:Dunno
UPX 5.0.1 Template:Start date Template:FreeGPL Yes
VMProtect 3.4 Template:Start date Template:Proprietary Yes
WWPack32 1.20 Template:Start date Template:Dunno No
XComp/XPack 0.98 Template:Start date Template:ProprietaryFreeware No
Yoda's Crypte Template:Dunno Template:Dunno Template:Dunno Template:Dunno
YZPack Template:Dunno Template:Dunno Template:Dunno Template:Dunno

ELF files

Known executable compressors for ELF files:

  • gzexe (uses a shell script stub and gzip, works on most Unix-like systems)
  • HASP Envelope
  • UPX
  • 624 (for Linux/386)[20]

CLI assembly files

Known executable compressors for CLI assembly files:

  • .NETZ
  • NsPack
  • Mpress
  • HASP Envelope
  • dotBundle
  • Exepack.NET
  • DotProtect:[21] Commercial protector/packer for .net and mono. Features on-line verifications and "industry standard encryption".

Mac OS Classic applications

Executable compressors for Mac OS Classic applications:

  • Application VISE[22]
  • StuffIt InstallerMaker

Mach-O (Apple Mac OS X) files

Known executable compressors for Mach-O (Apple Mac OS X) files:

  • HASP Envelope
  • UPX
  • VMProtect

Commodore 64 and VIC-20

Known executable compressors for executables on the Commodore 64 and VIC-20:

Amiga

Known executable compressors for executables on the Amiga series:

Java

Known executable compressors for Java:

JAR files:

WAR files:

  • HASP Envelope

JavaScript

There are two types of compression that can be applied to JavaScript scripts:

  • Reduce the redundancy in the script (by removing comments, white space and shorten variable and functions names). This does not alter the behavior of the script.
  • Compress the original script and create a new script that contains decompression code and compressed data. This is similar to binary executable compression.

Self-decompressing compressors

These compress the original script and output a new script that has a decompressor and compressed data.

  • JsSfx
  • Packify

Redundancy reducing compressors

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}

These remove white space, remove comments, and shorten variable and function names but do not alter the behavior of the script.

See also

References

  1. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  2. ↑ Template:Cite book
  3. ↑ Template:Cite journal
  4. ↑ 4.0 4.1 {{#invoke:citation/CS1|citation |CitationClass=web }}
  5. ↑ 5.0 5.1 Template:Cite newsgroup
  6. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  7. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  8. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  9. ↑ 9.0 9.1 {{#invoke:citation/CS1|citation |CitationClass=web }}
  10. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  11. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  12. ↑ 12.0 12.1 12.2 Template:Cite book
  13. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }} (NB. PKLITE 1.50 (1995) and higher gained the capability to compress device drivers, but not combined COM+SYS drivers.)
  14. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  15. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  16. ↑ 16.0 16.1 {{#invoke:citation/CS1|citation |CitationClass=web }}
  17. ↑ 17.0 17.1 {{#invoke:citation/CS1|citation |CitationClass=web }}
  18. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  19. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  20. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  21. ↑ DotProtect http://site.yvansoftware.be/dotpacker1_0 Template:Webarchive
  22. ↑ Template:Cite magazine
  23. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  24. ↑ web.comhem.se/~u13114991/exo/
  25. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  26. ↑ 26.0 26.1 26.2 {{#invoke:citation/CS1|citation |CitationClass=web }}
  27. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  28. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  29. ↑ Nizamettin Gok and Nitin Khanna. "Building Hybrid Android Apps with Java and JavaScript". Publisher: O'Reilly Media. 2013. p. 32. quote: "YUI Compressor is ... is one of the most popular JavaScript minifier tools"
  30. ↑ 30.0 30.1 30.2 Nicholas C. Zakas "Professional JavaScript for Web Developers". 2011. p. 768-769. quote: "Crunchers: An important part of the JavaScript build process ... JSMin ... Dojo ShrinkSafe ... and ... YUI compressor ..."