JeronimoColon
29th September 2004 05:26 UTC
Compression Performance Questions
I recently tried switching from the default compression (ZLIB) to LZMA and am unclear on a few things.
I know LZMA takes a while to compress (I don't mind that), but I'm finding it's also taking considerably longer to decompress compared to the default compression algorithm (ZLIB).
Is this right or am I doing something wrong... :igor:
Generally speaking, is LZMA suppose to be the fastest, followed by ZLIB and then BZIP2?
Also, am I right in assuming setting SetCompressorDictSize only affects compression (the making of the package) and shouldn't have an affect on the end user's side with regards to memory utilization or possibly decompression speed?
Any clarification on this would be greatly appreciated.
Thanks.
jc3
RobGrant
29th September 2004 10:05 UTC
If something takes longer to compress it will also take longer to decompress because it's running a heavier weight algorithm over the data.
JeronimoColon
30th September 2004 05:49 UTC
From the user manual:
The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower.
Anyone else...?
jc3
kichik
30th September 2004 10:01 UTC
LZMA is not supposed to be the fastest, it's supposed to provide the best ratio.
SetCompressorDictSize does affect the end user. LZMA will allocate a buffer large enough to hold the dictionary for decompression.
JeronimoColon
1st October 2004 04:32 UTC
I see.
I was a little confused because in the manual "SetCompressor" states:
The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.
While "SetCompressorDictSize" states:
Sets the dictionary size in megabytes (MB) used by the LZMA compressor (default is 8 MB).
There was no explicit mention of decompression for SetCompressorDictSize and I didn't want to assume even though SetCompressor mentioned it.
Thanks for the clarification.
Much appreciated.
;)
jc3