UPX software tool.

The UPX tool is a free, portable, extendable, high-performance executable packer for several executable formats.
The last released of UPX version is 3.95 and can be found at official webpage.
The description of this software tool comes with this info:
UPX is a versatile executable packer with the following features:
– excellent compression ratio: compresses better than zip/gzip,
use UPX to decrease the size of your distribution!
– very fast decompression: about 10 MiB/sec on an ancient Pentium 133,
about 200 MiB/sec on an Athlon XP 2000+.
– no memory overhead for your compressed executables for most of the
supported formats
– safe: you can list, test and unpack your executables
Also, a checksum of both the compressed and uncompressed file is
maintained internally.

– universal: UPX can pack a number of executable formats:
* Atari/tos
* bvmlinuz/386 [bootable Linux kernel]
* djgpp2/coff
* dos/com
* dos/exe
* dos/sys
* linux/386
* linux/elf386
* linux/sh386
* ps1/exe
* rtm32/pe
* tmt/adam
* vmlinuz/386 [bootable Linux kernel]
* vmlinux/386
* watcom/le (supporting DOS4G, PMODE/W, DOS32a and CauseWay)
* win32/pe (exe and dll)
* win64/pe (exe and dll)
* arm/pe (exe and dll)
* linux/elfamd64
* linux/elfppc32
* mach/elfppc32

– portable: UPX is written in portable endian-neutral C++
– extendable: because of the class layout it’s very easy to support
new executable formats or add new compression algorithms
– free: UPX can be distributed and used freely. And from version 0.99
the full source code of UPX is released under the GNU General Public
License (GPL)
Let’s see the help command:

If you get the output the NotCompressibleException, the reason is the size of your binary is too small the tool cannot handle binaries under 40Kb.
Let’s test with a FASMW editor.
The reason I used the FASMW editor for testing is created with assembly language.
Most software created with advanced visual IDE can be optimized.
I copy the executable file to my UPX folder:

The command line for compression and output with this tool is:

The result size is:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.