It's always a great idea to have BufReader around IO handles such as files. Unfortunately if you have one underneath Niffler, it gets erased by Box<dyn Read>, and if you have another API on top of that which requires BufRead such as quick_xml::Reader, you need to add another BufReader on the outside as well.
It looks like the underlying compression libraries (xz, flate, bz2, I'm not sure about zstd-rs?) support BufRead interfaces and it would be great if it could be passed through.
It's always a great idea to have
BufReader
around IO handles such as files. Unfortunately if you have one underneath Niffler, it gets erased byBox<dyn Read>
, and if you have another API on top of that which requiresBufRead
such asquick_xml::Reader
, you need to add anotherBufReader
on the outside as well.It looks like the underlying compression libraries (xz, flate, bz2, I'm not sure about zstd-rs?) support
BufRead
interfaces and it would be great if it could be passed through.https://docs.rs/flate2/1.0.22/flate2/bufread/index.html https://docs.rs/bzip2/latest/bzip2/bufread/index.html https://docs.rs/xz/0.1.0/xz/bufread/index.html https://docs.rs/zstd/0.9.0+zstd.1.5.0/zstd/stream/read/struct.Decoder.html