View Full Version : Compression Methods
Freeman II
12th October 2002, 23:52
- 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, 09:25
personally i use rar (http://www.rarlabs.com). 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, 10:04
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, 10:15
LZMA sounds cool enough :D
Netsabes
13th October 2002, 12:30
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, 12:43
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, 13:36
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 (http://www.rarlabs.com)
Joost Verburg
13th October 2002, 13:56
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, 16:25
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, 16:57
rar is better then zip. Go with rar, my friend.
Joost Verburg
13th October 2002, 17:27
I have tested a lot of files (executables, graphics, text etc.), LZMA always gives me better results than RAR.
Lion King
13th October 2002, 21:11
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, 21:20
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, 17:42
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, 17:58
Huh? What does UPX has to do with bzip2 compression?
Netsabes
16th October 2002, 18:06
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, 18:52
Yes, some bugs have been fixed in the CVS version that caused it to load slower.
shantanu_gadgil
17th October 2002, 14:05
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, 14:11
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, 14:38
ZIP gives very bad compression ratio's.
LZMA decompressses fast :D
kichik
17th October 2002, 15:59
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, 16:39
where can i get NSIS with LZMA intergrated?
kichik
17th October 2002, 16:43
LZMA is already being implemented into NSIS.
It is not ready yet. I am working on it ;)
Freeman II
17th October 2002, 16:47
Thanks :)
n0On3
17th October 2002, 17:54
so, LZMA compresses better than RAR? And ACE?
I remember I tried 7-zip with disappointing results.
kichik
17th October 2002, 18:04
Are you sure you compressed using 7z and not Zip?
Joost Verburg
17th October 2002, 18:17
The 7z format (which uses LZMA) is quite new (last version I think).
n0On3
18th October 2002, 00:04
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, 01:57
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, 03:58
UPX is an EXE compressor
http://upx.sourceforge.net/
shantanu_gadgil
19th October 2002, 12:02
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
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.