Skip to content

Conversation

@qmfrederik
Copy link
Contributor

The .Dispose method in ZlibStream will attempt to verify the Adler32 checksum at the end of the stream.

The check will fail if not all decompressed data was read, since not all data was checksummed and the checksum will not match.

This PR updates the .Dispose logic a bit to only validate the checksum when we're sure all decompressed data has been read.

@qmfrederik
Copy link
Contributor Author

It's a bit shady to do checksum validation in a .Dispose method and to throw from there, since .Dispose should never throw.

@LordMike what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant