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

BEP47 - padding files #160

Open
alanmcgovern opened this issue Aug 27, 2024 · 1 comment
Open

BEP47 - padding files #160

alanmcgovern opened this issue Aug 27, 2024 · 1 comment

Comments

@alanmcgovern
Copy link

alanmcgovern commented Aug 27, 2024

Can the text of the BEP be clarified to explain what happens for the final non-empty file in a torrent. Logically no padding file is necessary as no alignment is needed. The BEP text currently states Padding files are synthetic files inserted into the file list to let the following file start at a piece boundary which further implies that padding files are only inserted when there is a subsequent non-empty file.

example

qbittorrent-hybrid.zip

EDIT: Specifically, I'm looking to get the text of the BEP updated to state that adding padding to the final file is an error.

However, as some torrent clients already (incorrectly?) create these padding files it should also encourage implementors to support this case.

@the8472
Copy link
Contributor

the8472 commented Oct 20, 2024

EDIT: Specifically, I'm looking to get the text of the BEP updated to state that adding padding to the final file is an error.

They're not an error (something that would render a torrent unprocessable). They're perhaps unnecessary, but shouldn't pose a problem for clients.

In the end padding files are just a signalling mechanism retrofitted onto BEP3 to omit some zero-byte ranges introduced for alignment. You still have to be able to process a torrent as-if those padding files were just regular files in case you're talking to a peer that doesn't understand padding files and will request blocks in those byte-ranges for example.

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

No branches or pull requests

2 participants