control first and last bytes size, optionally disable it#208
Merged
control first and last bytes size, optionally disable it#208
Conversation
e8fde9a to
6054d03
Compare
added 8 commits
February 15, 2026 16:36
6054d03 to
6167294
Compare
15bbc12 to
4d47d33
Compare
This was referenced Feb 15, 2026
pauldreik
added a commit
that referenced
this pull request
Feb 15, 2026
this adds control over the stages "read first bytes" and "read last bytes". the idea is to make it possible to skip one or both, and control the size of the read. the current first/last bytes pass read the bytes into the checksum field. this is now replaced with calculating a checksum over the first/last bytes. if the file is so small that it is smaller than the first/last byte size, the checksum is not calculated again (unless the checksum algorithm is different). the checksumming used for the first/last bytes is selected as a fast one, since if there would be a hash collision it will be caught by the full checksumming step later.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this adds control over the stages "read first bytes" and "read last bytes".
the idea is to make it possible to skip one or both, and control the size of the read.
the current first/last bytes pass read the bytes into the checksum field. this is now replaced with calculating a checksum over the first/last bytes.
if the file is so small that it is smaller than the first/last byte size, the checksum is not calculated again (unless the checksum algorithm is different).
the checksumming used for the first/last bytes is selected as a fast one, since if there would be a hash collision it will be caught by the full checksumming step later.