#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

#73 in #filesize

Download history 15/week @ 2024-11-16 5/week @ 2024-11-23 24/week @ 2024-11-30 45/week @ 2024-12-07 7/week @ 2024-12-14 2/week @ 2025-01-04 13/week @ 2025-01-11 14/week @ 2025-01-18 26/week @ 2025-01-25 20/week @ 2025-02-01 31/week @ 2025-02-08 27/week @ 2025-02-15 27/week @ 2025-02-22 48/week @ 2025-03-01

140 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