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

[bep52] Support dynamic piece sizes #508

Merged
merged 2 commits into from
Jan 24, 2022
Merged

Conversation

alanmcgovern
Copy link
Owner

With bittorrent v2, the last piece of every file may be less than 'PieceLength' bytes. This means all calculations covering PieceIndex -> byte offset, or vice versa, need to be adapted.

As hashes are now per-file, the last piece of every file is
likely to be shorter than PieceLength. Support this.
@alanmcgovern alanmcgovern merged commit 33d00e4 into master Jan 24, 2022
@alanmcgovern alanmcgovern deleted the bep-52-dynamic-piece-size branch January 24, 2022 00:06
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