rust-lang / flate2-rs

DEFLATE, gzip, and zlib bindings for Rust
https://docs.rs/flate2
Apache License 2.0
929 stars 163 forks source link

flate2::bufread::GzDecoder doesn't impl BufRead? #374

Closed georeth closed 1 year ago

georeth commented 1 year ago

The document says:

https://github.com/rust-lang/flate2-rs/blob/f285e9abac98aa4f0a15d2e79993a261f166056c/src/gz/bufread.rs#L22-L24

but flate2::bufread::GzDecoder only implement Read.

https://github.com/rust-lang/flate2-rs/blob/f285e9abac98aa4f0a15d2e79993a261f166056c/src/gz/bufread.rs#L281

BufRead interface is not implemented and exposed.

georeth commented 1 year ago

Other decoders in bufread mod consumes a BufRead.

https://github.com/rust-lang/flate2-rs/blob/f285e9abac98aa4f0a15d2e79993a261f166056c/src/deflate/bufread.rs#L10

I think GzDecoder's documentation should be fixed.

Byron commented 1 year ago

Thanks a lot for pointing out this error. Would you like to become a contributor? I'd appreciate your help with a fix. Thanks for your consideration.

georeth commented 1 year ago

Sure. I will create a pull request to fix the doc when I'm back at a keyboard.