- NSIS Discussion
- Compression Methods
Archive: Compression Methods
Freeman II
13th October 2002 00:52 UTC
Compression Methods
- Is there any other compression methods available for NSIS besides zlib or bz2?
- if not how can we add other compression methods? (hope it's not too complicated)
- my last question is not NSIS related. What is the best compression method out there? personaly i think winace is the smallest.
Yathosho
13th October 2002 10:25 UTC
personally i use rar. the discussion was on before, rar for instance has to licensed to be integrated into nsis . i guess its a similiar issue with ace.
Joost Verburg
13th October 2002 11:04 UTC
kichik is working on the integration of LZMA compression (www.7-zip.org), which is about 25% smaller than BZip2 for me.
Koen van de Sande
13th October 2002 11:15 UTC
LZMA sounds cool enough :D
Netsabes
13th October 2002 13:30 UTC
Wow, LZMA compression is really good (even if it's a bit slow).
Will this be integrated anytime soon in NSIS (say, before beta0 is released)?
Joost Verburg
13th October 2002 13:43 UTC
Originally posted by Netsabes
Wow, LZMA compression is really good (even if it's a bit slow).
Will this be integrated anytime soon in NSIS (say, before beta0 is released)?
Compression is a bit slower of course, but decompression is fast. It won't be integerated in beta 0, but I hope that kichik will have it ready soon. :)
Yathosho
13th October 2002 14:36 UTC
if i remember correctly, winrar's documentation describes how to compress using the rar-algorithm using winrar's very own .dll. this should at least let registered (and trial) users of winrar use rar compression. i'm not sure about legal issues, but that should be documented aswell. this could leave the option to winrar users to compress using rar.
(Win)RAR Homepage
Joost Verburg
13th October 2002 14:56 UTC
If you want to use another compression method, it's always possible to use DLL's, but integration in NSIS makes it much easier.
Integrating RAR won't be very useful, because LZMA compresses much better.
Lion King
13th October 2002 17:25 UTC
rar.dll is only for decompression, you'd have to buy rar to compress the data, not to mention the big overhead in the installer because of that dll
using the unrar source code which is available at www.rarlabs.com would be better, additionally you'd have to build an interface to winrar.exe into makensis
unace sources aren't available afaik
lzma doesn't always compresses better than rar, because rar has special compression schemes for multimedia files, images or text files (ppmd) buildin
anyway I vote for using only opensource compression algorythms in nsis
G3NeRiX
13th October 2002 17:57 UTC
rar is better then zip. Go with rar, my friend.
Joost Verburg
13th October 2002 18:27 UTC
I have tested a lot of files (executables, graphics, text etc.), LZMA always gives me better results than RAR.
Lion King
13th October 2002 22:11 UTC
did you test rar 3.0?
and 7z? 7-zip also has ppmd implemented which is not part of lzma, ppmd is responsible for good compression of text files
7z uses multiple algorithms: http://www.7-zip.org/7z.html but it doesn't have special treatment for multimedia files yet
or did you force 7zip to use only lzma compression?
Joost Verburg
13th October 2002 22:20 UTC
I used only the LZMA compression of 7-zip and RAR 3.0. I didn't use that many text files, maybe PPMD is a little better for 'em, but most software packagers don't have many text files.
Netsabes
16th October 2002 18:42 UTC
Speaking of compression:
If you use the bzip2 compression, you should try to pack your installer with UPX (http://upx.sf.net/). Without it, you have to wait for the installer to have uncompressed the data (it's a bit slow because of bzip2), but with UPX, the installer is shown instantly.
This is very useful if you have a big installer (and if it takes some time to uncompress) :)
kichik
16th October 2002 18:58 UTC
Huh? What does UPX has to do with bzip2 compression?
Netsabes
16th October 2002 19:06 UTC
Hmm, I must be dumb, it works without UPX too. Did you update the bzip2 code between a7 and the current cvs? I suppose it must be that.
kichik
16th October 2002 19:52 UTC
Yes, some bugs have been fixed in the CVS version that caused it to load slower.
shantanu_gadgil
17th October 2002 15:05 UTC
Could we get some method of a "degree of compression" versus "speed" facility.
Say, if we compress the stuff with a compression level of say 5/9 then we have a trade off between size and speed.
I don't know whether different levels are possible in zlib2, bzip or lzma, but RAR does, so hey, go RAR ! :D
- Shantanu
shantanu_gadgil
17th October 2002 15:11 UTC
I think decompression speed is also very important. I forgot to mention in the previous post... Why not ZIP ?
- Shantanu
Joost Verburg
17th October 2002 15:38 UTC
ZIP gives very bad compression ratio's.
LZMA decompressses fast :D
kichik
17th October 2002 16:59 UTC
You can change BZip2 compression ratio in config.h and recompile.
LZMA is free, RAR is not. LZMA can be integrated into NSIS, RAR will have to use an external program to compress and decompress (149KB DLL or implemented source). LZMA is already being implemented into NSIS. RAR is not free. Joost have tested a lot and says LZMA compresses better than RAR. To compress with RAR one will have to buy it and install it after he installs NSIS. Have I mentioned RAR is not free?
Freeman II
17th October 2002 17:39 UTC
where can i get NSIS with LZMA intergrated?
kichik
17th October 2002 17:43 UTC
LZMA is already being implemented into NSIS.
It is not ready yet. I am working on it ;)
Freeman II
17th October 2002 17:47 UTC
Thanks :)
n0On3
17th October 2002 18:54 UTC
so, LZMA compresses better than RAR? And ACE?
I remember I tried 7-zip with disappointing results.
kichik
17th October 2002 19:04 UTC
Are you sure you compressed using 7z and not Zip?
Joost Verburg
17th October 2002 19:17 UTC
The 7z format (which uses LZMA) is quite new (last version I think).
n0On3
18th October 2002 01:04 UTC
I am sure I used 7z format and not zip.
The version I used was 7-Zip v2.30 beta 19, from the end of May 2002.
Now, I am going to download again and test.
rainwater
18th October 2002 02:57 UTC
Originally posted by n0On3
I am sure I used 7z format and not zip.
The version I used was 7-Zip v2.30 beta 19, from the end of May 2002.
Now, I am going to download again and test.
The comparison should be to zlib and bzip2. Rar and Ace are not free therefore are not available. Based on what I've been told, for a larger number of files, lzma is even better than zlib and bzip2.
Player 1
19th October 2002 04:58 UTC
UPX is an EXE compressor
http://upx.sourceforge.net/
shantanu_gadgil
19th October 2002 13:02 UTC
OK, now I understand why NOT RAR... :up:
What I was saying about the compression level is that, how about an option to set the compression level (say CompressionLevel ?) from within the script
One more thing..._WHATEVER_ compression algorithm you guys use pleeease use whichever one is FREE :) !!!
- Shantanu