[bittorrent] Metainfo Integers

Roger Pau Monné royger at gmail.com
Thu Jul 22 04:59:30 EDT 2010


Thanks for the reply. Well since my parser is only used to decode
.torrent files, I think I'm safe using uint64. Also, my programming
language doesn't support anything larger than uint64 (for the time
being).

2010/7/21 Harold Feit <dwknight at depthstrike.com>:
> The BEncode format considers the possibility of non-torrent applications
> for storage. There is the potential for other applications to need
> negative values to be stored as integers.
>
> Unsigned integers of varying lengths are possible, even beyond 64-bit.
> Be prepared to adjust accordingy.
>
> On 21/07/2010 1:04 PM, Roger Pau Monné wrote:
>> Hello,
>>
>> I'm sorry to bother the list with this noob question, but I've read at
>> http://wiki.theory.org/BitTorrentSpecification that integers in
>> bittorrent metainfo bencoded files (.torrent) can be 64bit signed
>> integers, why are they signed? Since it's only used for piece lenght,
>> number of pieces... It is correct to treat them as 64bit unsigned
>> integers? Or I am missing something.
>>
>> Thanks for the help, Roger
>> _______________________________________________
>> BitTorrent mailing list
>> BitTorrent at lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/bittorrent
>>
>>
>



More information about the BitTorrent mailing list