#byte #conversion #convert

big-bytes

Converts a number to the largest possible multiple of the byte unit

1 stable release

1.0.0 Oct 5, 2019

#358 in Value formatting

Download history 101/week @ 2024-04-12 64/week @ 2024-04-19 155/week @ 2024-04-26 83/week @ 2024-05-03 78/week @ 2024-05-10 229/week @ 2024-05-17 280/week @ 2024-05-24 135/week @ 2024-05-31 124/week @ 2024-06-07 283/week @ 2024-06-14 156/week @ 2024-06-21 69/week @ 2024-06-28 137/week @ 2024-07-05 141/week @ 2024-07-12 187/week @ 2024-07-19 151/week @ 2024-07-26

617 downloads per month

MIT/Apache

8KB
108 lines

big-bytes

GitHub Release Date

Converts a number to the largest possible multiple of the byte unit

Example

use big_bytes::BigByte;

let bytes = 2.456 * 1024_f32.powi(3);

assert_eq!("2.46 GiB", bytes.big_byte(2));

lib.rs:

Helps represent bytes with the largest possible mutliple of the byte unit.

Example

use big_bytes::BigByte;

let bytes = 2.456 * 1024_f32.powi(3);

assert_eq!("2.46 GiB", bytes.big_byte(2));

No runtime deps