an utility for human-readable bytes representations
///|
test "raw unit helpers return exact byte counts" {
assert_eq(@bytesize.kb(1), 1_000UL)
assert_eq(@bytesize.mb(1), 1_000_000UL)
assert_eq(@bytesize.gb(1), 1_000_000_000UL)
assert_eq(@bytesize.tb(1), 1_000_000_000_000UL)
assert_eq(@bytesize.pb(1), 1_000_000_000_000_000UL)
assert_eq(@bytesize.kib(1), 1_024UL)
assert_eq(@bytesize.mib(1), 1_048_576UL)
assert_eq(@bytesize.gib(1), 1_073_741_824UL)
assert_eq(@bytesize.tib(1), 1_099_511_627_776UL)
assert_eq(@bytesize.pib(1), 1_125_899_906_842_624UL)
}fn gb(size : UInt64) -> UInt64fn gib(size : UInt64) -> UInt64fn ideal_unit_no_std(size : Double, unit : UInt64) -> Intfn kb(size : UInt64) -> UInt64fn kib(size : UInt64) -> UInt64fn mb(size : UInt64) -> UInt64fn mib(size : UInt64) -> UInt64fn pb(size : UInt64) -> UInt64fn pib(size : UInt64) -> UInt64fn tb(size : UInt64) -> UInt64fn tib(size : UInt64) -> UInt64an utility for human-readable bytes representations