[bittorrent] structure of multifile bittorrent file

Song Zhang songzhang2008 at gmail.com
Fri Apr 9 17:51:04 EDT 2010


Hi,

I have a question about the structure of multifile torrent file

for example, I have two files a and b, and put them into one directory. I am
trying to create one torrent file including the contents of these two files.

I am wondering how the system handling the last piece less than 256k for
each file of a and b,

size(a) = n * 256k + a1
size(b) = m * 256k + b1

a1 and b1 above all less than 256k

the question is:

1. when generating torrent files, for the ”pieces“ part of info dictionary
of torrent file, there should be two SHA1 value from pieces less than 256k,
right ?  Although the SHA1 value of each piece (no matter greater or less
than 256k) is always 20bytes.

2. but I don't understand during the data transfer period, the pieces are
divided into blocks and how to handle these pieces less than 256k ?

thanks a lot for the help !!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20100409/0eb0c3e4/attachment.html 


More information about the BitTorrent mailing list