• Jeremy Hylton's avatar
    [ #403753 ] zlib decompress; uncontrollable memory usage · 511e2cac
    Jeremy Hylton yazdı
    Mostly by Toby Dickenson and Titus Brown.
    
    Add an optional argument to a decompression object's decompress()
    method.  The argument specifies the maximum length of the return
    value.  If the uncompressed data exceeds this length, the excess data
    is stored as the unconsumed_tail attribute.  (Not to be confused with
    unused_data, which is a separate issue.)
    
    Difference from SF patch: Default value for unconsumed_tail is ""
    rather than None.  It's simpler if the attribute is always a string.
    511e2cac
test_zlib 440 Bytes