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

Clear trailing bytes in StreamVByte to ensure bit-exact output #116

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

pps83
Copy link
Contributor

@pps83 pps83 commented Jun 9, 2024

StreamVByte codec rounds up output size to multiple of 4 bytes. As a result, up to 3 trailing bytes could be uninitialized memory passed to the encodeArray function. To ensure bitexact output, these padding bytes should be cleared.

@pps83 pps83 force-pushed the master-StreamVByte-padding branch from 34ee4bb to 2c446fc Compare June 9, 2024 20:43
StreamVByte codec rounds up output size to multiple of 4 bytes. As a result, up to 3 trailing bytes could be uninitialized memory passed to the encodeArray function. To ensure bitexact output, these padding bytes should be cleared.
@pps83 pps83 force-pushed the master-StreamVByte-padding branch from 2c446fc to 006dc00 Compare June 9, 2024 20:47
@lemire
Copy link
Member

lemire commented Jun 9, 2024

Looks reasonable!!!

@lemire lemire merged commit 5a45be3 into fast-pack:master Jun 10, 2024
4 checks passed
@lemire
Copy link
Member

lemire commented Jun 10, 2024

Merged.

@pps83 pps83 deleted the master-StreamVByte-padding branch June 10, 2024 14:37
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.

2 participants