Function jupiter::fmt::format_bytes

source ·
pub fn format_bytes(size_in_bytes: usize, f: &mut dyn Write) -> Result
Expand description

Formats a given size in bytes.

This function determines the ideal unit (ranging from bytes to petabytes) to provide a concise representation.

Note that a helper function format_size is also provided which directly returns a String. This function also provides some examples.