Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the implementation of StreamingXXHash32.asChecksum() #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trazfr
Copy link

@trazfr trazfr commented Aug 25, 2021

In the Checksum view, we only keep the last 28 bits of the hash instead of the 32 bits of the full hash.

The result is that the 4 first bits are always set to 0 in LZ4Block*Stream.
This PR:

  • fixes the Checksum view in StreamingXXHash32
  • keeps the current behaviour in LZ4Block*Stream to avoid breaking existing data built with this library

@trazfr trazfr force-pushed the fix_StreamingXXHash32_Checksum branch from aaa03d0 to d4e0ea7 Compare August 25, 2021 18:30
In the Checksum view, we only keep the last 28 bits of the hash instead
of the 32 bits of the full hash.
@trazfr trazfr force-pushed the fix_StreamingXXHash32_Checksum branch from d4e0ea7 to ff795d9 Compare August 26, 2021 16:24
…ream

Before the PR, the 4 first bits were always set to 0 in LZ4Block*Stream.

This commit keeps the current behaviour in LZ4Block*Stream to avoid
breaking existing data built with this library
@trazfr trazfr force-pushed the fix_StreamingXXHash32_Checksum branch from ff795d9 to d010601 Compare August 26, 2021 16:25
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