我正在尝试下载多个 torrent,其中我想要最后的 .mp4 文件。 我无法专门针对特定文件的特定部分,但例如,如果我的 torrent 包含 3 个文件:
1.mp4 2.mp4 3.mp4
torrent 的最后一段与 3.mp4 文件的最后一段相同吗?因此,通过下载最后一段,我将下载最后一段 3.mp4 文件。 有没有办法同时定位 2.mp4 和 1.mp4 的最后一段? 谢谢。
最佳答案
Is the last piece of torrent same as last piece of the 3.mp4 file? So that, by downloading the last piece I will be downlaoding the last piece of 3.mp4 file.
是的
Is there a way to target last pieces of 2.mp4 and 1.mp4 as well?
是的
创建 torrent 时,其中的所有文件都会连接在一起,然后分成多个 block 。
example:
Files |-------------------#1|----------------#2|---------------------------#3|
Pieces |--0|--1|--2|--3|--4|--5|--6|--7|--8|--9|-10|-11|-12|-13|-14|-15|-16|17|
- 除最后一 block 外,所有部分都具有相同的长度。
- 一个文件有一个或多个部分。
- 一篇文章可能包含多个文件(其中的一部分)。
- 内部文件和片段边界很少会对齐(除非使用填充文件)。
- 多文件 torrent 中的一个文件几乎总是与另一个文件共享一个片段。
.torrent 文件的元数据中有: block 大小、文件大小以及文件的确切顺序。
文件按照 .torrent 文件中的 files
列表中的显示顺序进行排序。
该顺序由 torrent 创建者决定,并且可以是任意顺序。文件大小、磁盘顺序、字母顺序、随机、创建日期、名称长度等
根据该数据,可以准确计算特定文件结束的片段和偏移量。
关于bittorrent - torrent 的最后一段是否对应于最后一个文件的最后一段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51948413/