Have been using deflate for encoding/decoding various moderatly sized data (under 5KB), where I need to parse some encoded heading variabely-sized metadata first.
Have been wondering, if there is any strong reason as to why encoders and decoders do not implement BufRead/Write, if internal implementations certainly use buffered IO.
Even though files in question are small, they can quickly bloat in numbers, and the neccessity of repeatedly either allocating in-memory raw buffers on heap or wrapping decoder/incoder in BufReaders/Writers (which, while enabling more "lazy", "stream-fashioned" approach, still do those same allocations internally) seems concerning perfromance-wise.
Hello.
Have been using deflate for encoding/decoding various moderatly sized data (under 5KB), where I need to parse some encoded heading variabely-sized metadata first.
Have been wondering, if there is any strong reason as to why encoders and decoders do not implement BufRead/Write, if internal implementations certainly use buffered IO.
Even though files in question are small, they can quickly bloat in numbers, and the neccessity of repeatedly either allocating in-memory raw buffers on heap or wrapping decoder/incoder in BufReaders/Writers (which, while enabling more "lazy", "stream-fashioned" approach, still do those same allocations internally) seems concerning perfromance-wise.