Torrent file

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m
Line 19: Line 19:
 
*** <tt>path</tt> - Subdirectory name list; last name is filename
 
*** <tt>path</tt> - Subdirectory name list; last name is filename
 
*** <tt>length</tt> - File size in bytes.
 
*** <tt>length</tt> - File size in bytes.
 +
 +
== Sample files ==
 +
* [http://urlte.am/releases/2013-01-02/urlteam.torrent URLTEAM torrent of URL shortener data]
  
 
== References ==
 
== References ==

Revision as of 16:00, 5 January 2013

File Format
Name Torrent file
Ontology
Extension(s) .torrent
MIME Type(s) application/x-bittorrent


A Torrent file is used by the BitTorrent protocol as a way of helping its users locate a file. BitTorrent is a peer-to-peer network with an ever-changing set of nodes that appear and disappear minute-to-minute as different users start and stop copies of the BitTorrent software. Special nodes called trackers are the point of contact to obtain files shared through the network, though the actual data of the file may be obtained in lots of little pieces spread over many nodes. A torrent file is the first thing you need to obtain before getting a file from BitTorrent; these can be found on many websites.

Torrent files are serialized using the Bencode system, and contain these keys:

  • announce - URL of tracker that knows where to find the file
  • info - Dictionary containing more info about the file:
    • name - Filename/suggested save path
    • piece length - bytes per piece; commonly 262,144 (256K)
    • pieces - Concatenation of SHA-1 hashes of pieces
    • length - File size in bytes, if only one file is being shared
    • files - List of file dictionaries if multiple files are being shared:
      • path - Subdirectory name list; last name is filename
      • length - File size in bytes.

Sample files

References

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox