[Zlib-devel] DEF_MEM_LEVEL vs. MAX_MEM_LEVEL
Mark Adler
madler at alumni.caltech.edu
Sun Apr 17 00:57:57 EDT 2005
On Apr 11, 2005, at 8:03 AM, Jan Ringoš wrote:
> I compress 65471 bytes long buffers of general data and the output
> buffer is always few bytes longer with MAX_MEM_LEVEL than with
> DEF_MEM_LEVEL.
That's why it's the default. The problem with MAX_MEM_LEVEL is that
the deflate blocks are larger, and therefore not as adaptive to
changing data resulting in lower compression.
> How significant is performance gain when MAX_MEM_LEVEL is used?
zlib.h does imply that, but I don't know if there really is a speed
gain, or by how much if there is one. You'd have to measure it with
your compiler and platform anyway to really know.
mark
More information about the Zlib-devel
mailing list