Package-level declarations
Types
The add-a-torrent payload produced by LoadTorrent. This is the pure-Kotlin analogue of the fields libtorrent's load_torrent_* functions populate in an add_torrent_params (src/load_torrent.cpp, update_atp).
Builds a .torrent file from a set of files, piece geometry and pre-computed piece hashes -- pure-Kotlin port of libtorrent's create_torrent (src/create_torrent.cpp, include/libtorrent/create_torrent.hpp).
One file within a torrent: port of the per-file data libtorrent keeps in file_storage (file_storage.hpp). offset is the file's start within the torrent's single concatenated byte stream, which is what maps pieces to files.
The set of files in a torrent and the geometry that ties them to pieces: port of libtorrent's file_storage. For a single-file torrent there is exactly one entry whose path is the torrent name.
Decides which BitTorrent v2 merkle-hash ranges to request from peers, and validates the hashes responses into per-file MerkleTrees. This is a practical-level port of libtorrent's hash_picker (src/hash_picker.cpp).
Thin loaders that turn raw .torrent bytes (or an already-decoded node) into a parsed torrent. This is the pure-Kotlin port of libtorrent's src/load_torrent.cpp (load_torrent_buffer / load_torrent_parsed, and the update_atp drain step).
The information extracted from a magnet: URI: the pure-Kotlin counterpart of the subset of libtorrent's add_torrent_params that parseMagnetUri fills in (src/magnet_uri.cpp, parse_magnet_uri).
In-memory BitTorrent v2 merkle tree for one file: a focused pure-computation port of libtorrent's aux::merkle_tree (include/libtorrent/aux_/merkle_tree.hpp
A parsed .torrent file. This is the pure-Kotlin counterpart of libtorrent's torrent_info (torrent_info.cpp). Built from the bencoded bytes of a torrent, it exposes the metadata a client needs: the name, the file list, piece geometry, the trackers, and the info-hash or hashes.