{
  "id": "enwiki-001344362789",
  "slug": "bencode",
  "title": "Bencode",
  "qid": "",
  "lead": "Bencode (pronounced like Bee-encode) is the encoding used by the peer-to-peer file sharing system BitTorrent for storing and transmitting loosely structured data. It supports four different types of values: * byte strings, * integers, * lists (arrays), and * dictionaries (associative arrays). Bencoding is most commonly used in torrent files, and as such is part of the BitTorrent specification. These metadata files are simply bencoded dictionaries. Bencoding is simple and (because numbers are encoded as text in decimal notation) is unaffected by endianness, which is important for a cross-platform application like BitTorrent. It is also fairly flexible, as long as applications ignore unexpected dictionary keys, so that new ones can be added without creating incompatibilities.",
  "body": "Bencode (pronounced like Bee-encode) is the encoding used by the peer-to-peer file sharing system BitTorrent for storing and transmitting loosely structured data. It supports four different types of values: byte strings, integers, lists (arrays), and dictionaries (associative arrays). Bencoding is most commonly used in torrent files, and as such is part of the BitTorrent specification. These metadata files are simply bencoded dictionaries. Bencoding is simple and (because numbers are encoded as text in decimal notation) is unaffected by endianness, which is important for a cross-platform application like BitTorrent. It is also fairly flexible, as long as applications ignore unexpected dictionary keys, so that new ones can be added without creating incompatibilities. ==Features== Bencode is a very specialized kind of binary coding with some unique properties: For each possible (complex) value, there is only a single valid bencoding; i.e. there is a bijection between values and their encodings. This has the advantage that applications may compare bencoded values by comparing their encoded forms, eliminating the need to decode the values. Bencoding serves similar purposes as data languages like JSON and YAML, allowing complex yet loosely structured data to be stored in a platform independent way. This allowing a linear memory storage for complex data. ==See also== Canonical S-expressions BitTorrent ==External links== Bencoding specification File_Bittorrent2 - Another PHP Bencode/decode implementation The original BitTorrent implementation in Python as standalone package Torrent File Editor cross-platform GUI editor for BEncode files bencode-tools - a C library for manipulating bencoded data and a XML schema like validator for bencode messages in Python Bento - Bencode library in Elixir. Beecoder - the file stream parser that de/encoding \"B-encode\" data format on Java using java.io.* stream Api. Bencode parsing in Java Bencode library in Scala Bencode parsing in C There are numerous Perl implementations on CPAN",
  "categories": [
    "20313012",
    "20332849",
    "23603337",
    "24623845",
    "26220375"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1344362789",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1773963078.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001344362789",
    "type": "webpage",
    "title": "Bencode",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/bencode",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001344362789",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1344362789",
    "note": "Immutable snapshot enwiki-001344362789"
  }
}