Closed radekm closed 2 years ago
This behavior also makes it harder to read corrupted archives (even if you are interested in some prefix which is ok).
This is completely wrong. I was using libflate
instead of flate2
.
And flate2
behaves correctly.
It seems that
deflate::Decoder
always decompresses whole block.If that is true it means:
io::Read
which is implemented bydeflate::Decoder
.Here is an example. Reading 1 byte from 10 MB stream consumes 1.3 GB of memory: