Compression

Compression is an important part of making a portable app. Many users will want the apps to be as small as possible, so they can fit more apps and data on their drives. It will also make it a faster download for the users, as it has a smaller file size.

Binary Compression

The tool of choice for compression binaries, like EXE and DLL files, is UPX. The recommended settings for this are

--best --compress-icons=0 --nrv2e --crp-ms=999999 -k

If you are comfortable with using the command line, cd into your App folder and run

for /r %e in (*.exe,*.dll) do upx "%e" --best --compress-icons=0 --nrv2e --crp-ms=999999 -k

A package with UPX and a script is coming soon.

After UPX compressing the files, testing the application out, and everything seems good-to-go, remember to go back and delete the original executable files you “kept” with the ”-k” switch that now have the extension of .ex~ or .dl~.

del /S *.*~

If testing shows that some functionality of the application is lost (it crashes, etc) you can get the original files back with

for /r %%e in (*.exe,*.dll) do upx "%%e" -d

(Please note: this must be done before you delete the files above)

Note: all examples above assume upx.exe is in your PATH.

Image Compression

Jar Compression

Download Programs and Scripts

A self-extracting archive with all the programs & scripts need to compress executables, recompress JAR files, and optimize PNGs is available for download here.

 
compression.txt · Last modified: 2008/03/24 08:31 by buddhachu
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki