#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

#329 in #conversion

Download history 597/week @ 2024-11-13 567/week @ 2024-11-20 134/week @ 2024-11-27 262/week @ 2024-12-04 174/week @ 2024-12-11 277/week @ 2024-12-18 50/week @ 2024-12-25 174/week @ 2025-01-01 148/week @ 2025-01-08 230/week @ 2025-01-15 97/week @ 2025-01-22 5/week @ 2025-01-29 39/week @ 2025-02-05 124/week @ 2025-02-12 80/week @ 2025-02-19 114/week @ 2025-02-26

358 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