#display #size #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

#69 in #filesize

Download history 8/week @ 2024-08-26 14/week @ 2024-09-02 19/week @ 2024-09-09 10/week @ 2024-09-16 22/week @ 2024-09-23 44/week @ 2024-09-30 45/week @ 2024-10-07 16/week @ 2024-10-14 20/week @ 2024-10-21 11/week @ 2024-10-28 17/week @ 2024-11-04 19/week @ 2024-11-11 12/week @ 2024-11-18 3/week @ 2024-11-25 31/week @ 2024-12-02 42/week @ 2024-12-09

91 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