Archive: BZ2 Disadvantage??


BZ2 Disadvantage??
Is there a disadvantage to compiling your installer with BZ2? If not, why shouldn't NSIS do that automatically? Thanks much!!


Here's a quick excerpt from the Users Manual:

NSIS supports different compression methods zlib and bzip2. zlib is fast and is very efficient in resources consumption. bzip2 usually gives better results for large installers, but requires a bit more memory and is a little slower.
From my own (non-comprehensive) experiences, it depends on your target machines and the archive you're creating. For example, I hit problems where I was extracing a ~40 Mb file using bzip2 on a Pentium 266 with 64Mb. This file took a significant amount of time to extract and somehow threw the timing of the setup script. Recompiling with zlib improved speed, and more importantly, didn't break the script. The same machine, however, is quite happy with ~20Mb files using bzip2.

Without any further exploration of the issue, if you've got big archives running on slow machines, you might want to consider zlib, otherwise I usually use bzip2.

Hope that helps,
Dave.

The difference between bzip2 and zlib compression is that bzip2 commpresses the whole installer and zlib compresses each file by it self. The reason bzip2 is not used by default, I think, is because bzip2 needs to uncompress all of the files in the installer, so that if a section is not selected by the user it will still have to be uncompressed, thus making the installer slower than zlib one if not all of the files are always installed.

Vytautas


BZ2 doesn't *always* make for a smaller installer, either. I have an issue where I redistribute an Installshield installer, using NSIS to launch the installshield installer with an "answer file"...I get almost no compression because Installshield has already compressed most of the files into the data.cab file.

The result is that if I use Bzip, the installer is (I think) about 40kb larger than if I use zlib.


If your files are already compressed, it's better to extract and recompress using NSIS or to disable NSIS compression.


how do you extract from an installshield cab file?


You could use the command line extract.exe or a specialised program such as WinAce, WinRAR, etc.

Vytautas


WinAce and Winrar won't extract installshield cab files...they're not the same as MS's cab files it seems


Try www.7-zip.org

-Stu


nope, doesn't work either