Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 12th October 2002, 23:52   #1
Freeman II
Junior Member
 
Join Date: Mar 2001
Posts: 37
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.
Freeman II is offline   Reply With Quote
Old 13th October 2002, 09:25   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,185
Send a message via ICQ to Yathosho
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.
Yathosho is offline   Reply With Quote
Old 13th October 2002, 10:04   #3
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
kichik is working on the integration of LZMA compression (www.7-zip.org), which is about 25% smaller than BZip2 for me.
Joost Verburg is offline   Reply With Quote
Old 13th October 2002, 10:15   #4
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
LZMA sounds cool enough

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Old 13th October 2002, 12:30   #5
Netsabes
Guest
 
Posts: n/a
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)?
  Reply With Quote
Old 13th October 2002, 12:43   #6
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Quote:
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.
Joost Verburg is offline   Reply With Quote
Old 13th October 2002, 13:36   #7
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,185
Send a message via ICQ to Yathosho
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
Yathosho is offline   Reply With Quote
Old 13th October 2002, 13:56   #8
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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.
Joost Verburg is offline   Reply With Quote
Old 13th October 2002, 16:25   #9
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
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
Lion King is offline   Reply With Quote
Old 13th October 2002, 16:57   #10
G3NeRiX
Junior Member
 
G3NeRiX's Avatar
 
Join Date: Oct 2002
Location: USA - Home of the Slightly Retarted and Mentally Challenged
Posts: 23
Send a message via AIM to G3NeRiX Send a message via Yahoo to G3NeRiX
rar is better then zip. Go with rar, my friend.
G3NeRiX is offline   Reply With Quote
Old 13th October 2002, 17:27   #11
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
I have tested a lot of files (executables, graphics, text etc.), LZMA always gives me better results than RAR.
Joost Verburg is offline   Reply With Quote
Old 13th October 2002, 21:11   #12
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
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?
Lion King is offline   Reply With Quote
Old 13th October 2002, 21:20   #13
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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.
Joost Verburg is offline   Reply With Quote
Old 16th October 2002, 17:42   #14
Netsabes
Guest
 
Posts: n/a
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) :)
  Reply With Quote
Old 16th October 2002, 17:58   #15
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Huh? What does UPX has to do with bzip2 compression?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 16th October 2002, 18:06   #16
Netsabes
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 16th October 2002, 18:52   #17
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Yes, some bugs have been fixed in the CVS version that caused it to load slower.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th October 2002, 14:05   #18
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
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 !

- Shantanu
shantanu_gadgil is offline   Reply With Quote
Old 17th October 2002, 14:11   #19
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
I think decompression speed is also very important. I forgot to mention in the previous post... Why not ZIP ?

- Shantanu
shantanu_gadgil is offline   Reply With Quote
Old 17th October 2002, 14:38   #20
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
ZIP gives very bad compression ratio's.

LZMA decompressses fast
Joost Verburg is offline   Reply With Quote
Old 17th October 2002, 15:59   #21
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
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?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th October 2002, 16:39   #22
Freeman II
Junior Member
 
Join Date: Mar 2001
Posts: 37
where can i get NSIS with LZMA intergrated?
Freeman II is offline   Reply With Quote
Old 17th October 2002, 16:43   #23
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Quote:
LZMA is already being implemented into NSIS.
It is not ready yet. I am working on it

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th October 2002, 16:47   #24
Freeman II
Junior Member
 
Join Date: Mar 2001
Posts: 37
Thanks
Freeman II is offline   Reply With Quote
Old 17th October 2002, 17:54   #25
n0On3
Senior Member
 
n0On3's Avatar
 
Join Date: Jan 2001
Location: Barcelona
Posts: 314
Send a message via ICQ to n0On3
so, LZMA compresses better than RAR? And ACE?

I remember I tried 7-zip with disappointing results.
n0On3 is offline   Reply With Quote
Old 17th October 2002, 18:04   #26
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Are you sure you compressed using 7z and not Zip?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th October 2002, 18:17   #27
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
The 7z format (which uses LZMA) is quite new (last version I think).
Joost Verburg is offline   Reply With Quote
Old 18th October 2002, 00:04   #28
n0On3
Senior Member
 
n0On3's Avatar
 
Join Date: Jan 2001
Location: Barcelona
Posts: 314
Send a message via ICQ to 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.
n0On3 is offline   Reply With Quote
Old 18th October 2002, 01:57   #29
rainwater
Senior Member
 
Join Date: Aug 2000
Posts: 396
Send a message via ICQ to rainwater
Quote:
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.
rainwater is offline   Reply With Quote
Old 19th October 2002, 03:58   #30
Player 1
Registered User
 
Player 1's Avatar
 
Join Date: Oct 2001
Posts: 90
Send a message via ICQ to Player 1 Send a message via AIM to Player 1 Send a message via Yahoo to Player 1
Post

UPX is an EXE compressor
http://upx.sourceforge.net/
Attached Files
File Type: zip bigfile.txt.zip.zip (1.3 KB, 75 views)
Player 1 is offline   Reply With Quote
Old 19th October 2002, 12:02   #31
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
OK, now I understand why NOT RAR...

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
shantanu_gadgil is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump