Jump to content

Bencode

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Kwi (talk | contribs) at 10:47, 4 November 2004 (The BitTorrent encoding). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Bencode is the encoding used by BitTorrent for storing and transmitting certain types of data.

It supports four different types of values, namely strings, integers, lists and associative arrays (called dictionaries, due to the Python origins of BitTorrent). The encoding is not particularly efficient, but it's simple and unaffected by endianness.