Package-level declarations
Types
Bencode decoder, the port of libtorrent's bdecode() (src/bdecode.cpp). Parses a bencoded buffer into a BdecodeNode tree whose nodes reference back into the original ByteArray (no copies of the payload are made until you ask for them).
Bdecode error codes. This is a direct port of libtorrent's bdecode_errors::error_code_enum (bdecode.hpp). BdecodeException carries one of these plus the byte offset where parsing failed, mirroring libtorrent's error_code + error_pos.
Thrown by Bdecode.decode when the input is not valid bencoding.
A node in the tree produced by Bdecode.decode. The port of libtorrent's bdecode_node (bdecode.hpp). Every node keeps a reference to the original parsed buffer plus the byte span it occupies, so dataSection can hand back the exact bytes a node was parsed from. That is what makes correct info-hashing possible: the v1 info-hash is SHA-1(info-dict's dataSection).
One node in a bencoded hierarchy: the owning variant type, the port of libtorrent's entry (entry.hpp). Use this to build structures (a torrent file, a DHT message, resume data) and hand them to Bencode.encode.