Skip to main content

format_size

Function format_size 

Source
pub fn format_size(bytes: u64) -> String
Expand description

Format a raw byte count as a human-readable size string.

Uses binary (KiB/MiB/GiB) units with decimal precision matching libtorrent / rqbit conventions. Sub-KiB values are reported as raw bytes. The largest unit is GiB to keep very large torrents on a single line.