• Matthew Somerville's avatar
    [1.8.x] Fixed #24242 -- Improved efficiency of utils.text.compress_sequence() · 2a55301f
    Matthew Somerville yazdı
    The function no longer flushes zfile after each write as doing so can
    lead to the gzipped streamed content being larger than the original
    content; each flush adds a 5/6 byte type 0 block. Removing this means
    buf.read() may return nothing, so only yield if that has some data.
    Testing shows without the flush() the buffer is being flushed every 17k
    or so and compresses the same as if it had been done as a whole string.
    
    Backport of caa3562d from master
    2a55301f
test_text.py 10.4 KB