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.11:31:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Actually it should be:

    # Using zlib's interface
    while not d.eof:
        output = d.decompress(d.unconsumed_tail, 8192)
        while not output and not d.eof:
            compressed =
            if not compressed:
                raise ValueError('End-of-stream marker not found')
            output = d.decompress(d.unconsumed_tail + compressed, 8192)
        # <process output>

Note that you should use d.unconsumed_tail + compressed as input, and therefore do an unnecessary copy of the data.

Without explicit unconsumed_tail you can write input data in the internal mutable buffer, it will be more effective for large buffer (handreds of KB) and small input chunks (several KB).
Date User Action Args
2012-12-04 11:31:31serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, christian.heimes, nadeem.vawda, eric.araujo, Arfrever
2012-12-04 11:31:31serhiy.storchakasetmessageid: <>
2012-12-04 11:31:31serhiy.storchakalinkissue15955 messages
2012-12-04 11:31:31serhiy.storchakacreate