Open aldanor opened 2 years ago
Also looking for this feature, am reading from a gzip compressed websocket and would really like to avoid the header heap allocation for each message since I'm working on an extremely low latency application.
Not what you asked for, but does https://github.com/rust-lang/flate2-rs/pull/323 fix this for you? It rewrites the gzip header parsing so that it does not allocate unless optional fields (extras, filename, comment, crc) are present.
It's not a huge deal, but
GzDecoder::new()
has a heap allocation and if you're decompressing disjoint chunks from many readers, not being able to simply reset an existing decoder is a bit depressing, especially given that it's possible forDeflateDecoder
. Wonder if it would make sense to addGzDecoder::reset(reader)
method?