Companion

object Companion

Properties

Link copied to clipboard

Hard cap on blocks per piece (15-bit counter in upstream). max_blocks_per_piece.

Link copied to clipboard
const val MAX_ENDGAME_PARTIALS: Int = 200

Cap on partial pieces scanned by the end-game tail (upstream's TORRENT_ALLOCA cap).

Link copied to clipboard
const val MAX_PARTIAL_BLOCKS: Int = 2048

Anti-sprawl cap: force OPTION_PRIORITIZE_PARTIALS once partial pieces hold more than this many blocks (2048 blocks = 32 MiB at 16 KiB). Matches the constant in pick_pieces.

Link copied to clipboard
const val OPTION_ON_PAROLE: Int = 4

The peer is on parole: only exclusive picks, no end-game tail. on_parole.

Link copied to clipboard

Drain partially-downloaded pieces before opening new ones. prioritize_partials.

Link copied to clipboard
const val OPTION_RAREST_FIRST: Int = 1

Pick rarest pieces first (the normal steady-state mode). rarest_first.

Link copied to clipboard
const val OPTION_REVERSE: Int = 2

Walk the pick order backwards, most common pieces first. reverse.

Link copied to clipboard
const val OPTION_SEQUENTIAL: Int = 16

Pick pieces in index order (streaming). sequential.

Link copied to clipboard
const val PRIO_FACTOR: Int = 3

Multiplier creating 3 sub-levels per availability. piece_picker::prio_factor.

Link copied to clipboard
const val PRIORITY_LEVELS: Int = 8

Number of priority levels (0..7). piece_picker::priority_levels.