New submission from Tobias Oberstein:
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.
----------
components: Library (Lib)
messages: 200114
nosy: oberstet
priority: normal
severity: normal
status: open
title: zlib compressobj: expose missing knobs
type: enhancement
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19278>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com