Martin Panter added the comment:

A different test case for “unused_data” attribute was added in 2012 for Issue 
16350, so that part is no longer needed.

If this feature goes ahead, it might be nice to also update the bzip and LZMA 
modules for consistency.

In Python 3, the equivalent of the buffer() option would look like this, 
assuming the memory view is in byte format:

zlib.decompress(memoryview(source)[unused_offset:])

Another option would be to copy some paint from the struct.unpack_from() 
bikeshed:

[data, offset] = zlib.decompress_from(buffer, offset)

----------
nosy: +vadmium

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5804>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to