sile / libflate

A Rust implementation of DEFLATE algorithm and related formats (ZLIB, GZIP)
https://docs.rs/libflate
MIT License
177 stars 35 forks source link

wrong gzip extra field #22

Closed quininer closed 5 years ago

quininer commented 5 years ago

In your code that handles extra field, you write an id before xlen.

The rfc specifies extra field can have multiple subfields, but the extra field itself has no id.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ab6cbb9ec6dff73db8313aeb7308a358

sile commented 5 years ago

Thank you for reporting this problem. I fixed it at the commit https://github.com/sile/libflate/commit/e2899b3129229b35b213a138712529a98479e38b.