#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

#297 in #conversion

Download history 220/week @ 2024-07-23 132/week @ 2024-07-30 292/week @ 2024-08-06 207/week @ 2024-08-13 383/week @ 2024-08-20 537/week @ 2024-08-27 258/week @ 2024-09-03 318/week @ 2024-09-10 490/week @ 2024-09-17 216/week @ 2024-09-24 156/week @ 2024-10-01 457/week @ 2024-10-08 300/week @ 2024-10-15 363/week @ 2024-10-22 171/week @ 2024-10-29 330/week @ 2024-11-05

1,186 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