This class represents a torrent piece. Torrents are made of pieces, which are in turn made of blocks that are exchanged using the peer protocol. The piece length is defined at the torrent level, but the last piece that makes the torrent might be smaller.
If the torrent has multiple files, pieces can spread across file boundaries. The TorrentByteStorage abstracts this problem to give Piece objects the impression of a contiguous, linear byte storage.
@author mpetazzoniPiece
is a section of data specified by the torrent metainfo. Each piece has a corresponding SHA-1 hash which is used to verify the integrity of the data that has been received from peers.
|
|
|
|