Archive: Compression Performance Questions


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


If something takes longer to compress it will also take longer to decompress because it's running a heavier weight algorithm over the data.


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

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.


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