Archive: Making A Huge Size of files into a small exe?


Making A Huge Size of files into a small exe?
I noticed that when I installed XAMPP, the install exe was 32 MB, but the extracted space took up around 230 MB. How would one mimic such a thing? (Since I use zip2exe though, I may not be able to do it)

For example, can I make 300 or so MB into 90 or so MB? This may have been asked before, but I looked through the search, 5 pages in or so.


it depends on the data stored in the installer. if it's data that can be compressed well (e.g. text or bitmaps), you can get much smaller installers. if the data is well compressed already (e.g. jpegs or mp3s), you will get no notable reduction.

in any case you need to use SetCompress/SetCompressor to activate compression for your installer.


Well, it has many, many different types of files. Including MDB Files, JScript class files, png images, and text files. Some files (like the MDB Files) are bigger than the other files.

I end up only cutting it down to 209 MB compressed, when the original size was 212 MB. Sad but true.

Although the XAMPP server has many, many different types of files (including different types of images, DLLs, sql text files, etc.)


Look at the documentation for "SetCompressor" to choose the compression method. Usually, LZMA gives me the best compression, but your mileage may vary. Also, if you include the /solid command, you might get even better compression ratios.

You can also adjust the dictionary size with the SetCompressorDictSize command (higher numbers will give better compression, but could take longer. And from what I understand, the dictionary size also determines the amount of RAM needed to decompress.)

And as Yathosho points out, you probably won't see much gain when compressing files already compressed. (I've also found that many binary files don't compress as well either.)


There is another way to achieve best compression, without having to modify the script: The .nsi context menu has a second option for 'Compile NSIS Script', called "Choose Compressor".