rust-lang / flate2-rs

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

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

Closed georeth closed 10 months ago

georeth commented 10 months 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 10 months 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 10 months 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 10 months ago

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