The BT seed file uses a coding method called Bencoding to save data. Bencoding has four types of data: SRINGS, Integers, Lists, Dictionaries (Dictionary) encoding rules: strings encoded as:
Integers encoding: i
Lists encoding: L
Dictionaries (Dictionary) encoded as D
The specific file structure is as follows: All content must be the Bencoding coding type. The entire file is a dictionary structure, including the following keyword Announce: Tracker server URL (Optional) Announce-list (optional TRACKER server list (list) Creation Date (optional): Time created by seed, UNIX standard Time format, from 1970 January 1 00:00:00 to the number of seconds (integer) Comment (Optional): Remarks (Optional): Create a man or create a program information (character Strings) Info: a dictionary structure, the main information of the file, is divided into two cases: single file structure or multi-file structure single file structure is as follows: Length: File length, unit byte (integer) MD5SUM (optional): Long 32 characters of the MD5 checksum, BT does not use this value, just to be reserved for some programs! (String) Name: file name (string) Piece Length: Size, unit bytes of each block ( Integer) PIECES: 20 bytes of each block (binary format) multi-file structure is as follows: FILES: a dictionary structure Length: File length, unit byte (integer) MD5SUM (optional): The same path and name in the file structure: the path and name of the file, is a list structure, such as the /test/test.txt list is L4: Test8Test.txte name: The top of the directory name (string) Piece Length: in the same single file structure The same example: The same example in the same single file structure: Open one with Notepad. Tort can look like the following D8: Announce35: http://www.manfen.net: 7802 / announce13: creation datei1076675108e4: infod6: lengthi17799e4: Name62 : Microsoft.windows.2000.and.nt4.source.code-sceneleader.torrent12: pieneleader.torrent12: pieces 20:? W ? 躐? 緕 緕 T 酆 EE easy to see Announce = http://www.manfen.net : 78 02 / announcecreation date = 1076675108 seconds (02/13/04 20:25:08) file name = microsoft.windows.2000.nd.nt4.source.code-sceneleader.torrent file size = 17799 byte file block size = 32768 byte