Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gzip decoding when FLG.FHCRC is set (#11805)
Motivation: The current implementation is not respecting the spec at https://www.ietf.org/rfc/rfc1952, section 2.3. > If FHCRC is set, a CRC16 for the gzip header is present, > immediately before the compressed data. The CRC16 consists > of the two least significant bytes of the CRC32 for all > bytes of the gzip header up to and not including the CRC16. The implementation is reusing the CRC32 logic without taking the two least significant bytes. Modifications: Use a method that respects the spec. Result: When the FLG.FHCRC bit is set, the correct verification algorithm will be used.
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters