#size #display #filesize #file

size-display

Display file sizes in human-readable form

5 releases

0.1.4 Jun 22, 2020
0.1.3 May 8, 2020
0.1.2 May 8, 2020
0.1.1 May 8, 2020
0.1.0 May 8, 2020

#46 in #filesize

Download history 38/week @ 2024-03-11 27/week @ 2024-03-18 17/week @ 2024-03-25 31/week @ 2024-04-01 10/week @ 2024-04-08 5/week @ 2024-04-15 31/week @ 2024-04-22 5/week @ 2024-04-29 9/week @ 2024-05-06 1/week @ 2024-05-13 26/week @ 2024-05-20 13/week @ 2024-05-27 23/week @ 2024-06-03 15/week @ 2024-06-10 52/week @ 2024-06-17 24/week @ 2024-06-24

117 downloads per month
Used in bcdl

MIT license

4KB

size-display

Crates.io

Display human readable file sizes.

Example

use size_display::Size;

assert_eq!("24", format!("{}", Size(24)));
assert_eq!("4.2G", format!("{:.1}", Size(4509715660)));

lib.rs:

Display human readable file sizes.

Limitation

Displayed units go up to Exabyte (2^60).

Example

use size_display::Size;

assert_eq!("24", format!("{}", Size(24)));
assert_eq!("4.2G", format!("{:.1}", Size(4509715660)));

No runtime deps