This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, christian.heimes, eric.araujo, nadeem.vawda, pitrou, serhiy.storchaka
Date 2012-12-04.08:49:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
>     # Using zlib's interface
>     while not d.eof:
>         compressed = d.unconsumed_tail or
>         if not compressed:
>             raise ValueError('End-of-stream marker not found')
>         output = d.decompress(compressed, 8192)
>         # <process output>

This is not usable with bzip2. Bzip2 uses large block size and unconsumed_tail 
can be non empty but decompress() will return b''. With zlib you possible can 
see the same effect on some input when read by one byte.

> A related, but orthogonal proposal: We might want to make unconsumed_tail
> a memoryview (provided the input data is know to be immutable), to avoid
> creating an unnecessary copy of the data.

It looks interesting. However the data should be copied anyway if the input 
data is not a bytes object.
Date User Action Args
2012-12-04 08:49:44serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, christian.heimes, nadeem.vawda, eric.araujo, Arfrever
2012-12-04 08:49:43serhiy.storchakalinkissue15955 messages
2012-12-04 08:49:43serhiy.storchakacreate