Message200114
The zlib library provides a couple of knobs to control the behavior and resource consumption of compression:
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
int level,
int method,
int windowBits,
int memLevel,
int strategy));
Of these, only `level`, `method` and `windowBits` are exposed on `zlib.compressobj` (and only the first is even documented: see issue #19277).
However, as was recently found from emperical evidence in the context of WebSocket compression
http://www.ietf.org/mail-archive/web/hybi/current/msg10222.html
the `memLevel` parameter in particular is very valuable in controlling memory consumption.
For WebSocket compression (with JSON payload), the following parameter set was found to provide a useful resource-consumption/compression-ratio tradeoff:
window bits=11
memory level=4
Hence, it would be useful to expose _all_ parameters in Python, that is `memLevel` and `strategy` too. |
|
Date |
User |
Action |
Args |
2013-10-17 08:06:27 | oberstet | set | recipients:
+ oberstet |
2013-10-17 08:06:27 | oberstet | set | messageid: <1381997187.57.0.66132821735.issue19278@psf.upfronthosting.co.za> |
2013-10-17 08:06:27 | oberstet | link | issue19278 messages |
2013-10-17 08:06:26 | oberstet | create | |
|