| Vulnerabilities | |||||
|---|---|---|---|---|---|
| Version | Suggest | Low | Medium | High | Critical |
| 2.3.1 | 0 | 0 | 0 | 0 | 0 |
| 2.3.0 | 0 | 0 | 0 | 0 | 0 |
| 2.2.0 | 0 | 0 | 0 | 0 | 0 |
| 2.1.0 | 0 | 0 | 0 | 0 | 0 |
| 2.0.1 | 0 | 0 | 0 | 0 | 0 |
| 2.0.0 | 0 | 0 | 0 | 0 | 0 |
| 1.3.3 | 0 | 0 | 0 | 0 | 0 |
| 1.3.2 | 0 | 0 | 0 | 0 | 0 |
| 1.3.1 | 0 | 0 | 0 | 0 | 0 |
| 1.3.0 | 0 | 0 | 0 | 0 | 0 |
| 1.2.0 | 0 | 0 | 0 | 0 | 0 |
| 1.1.0 | 0 | 0 | 0 | 0 | 0 |
| 1.0.2 | 0 | 0 | 0 | 0 | 0 |
| 1.0.1 | 0 | 0 | 0 | 0 | 0 |
| 1.0.0 | 0 | 0 | 0 | 0 | 0 |
| 0.2.4 | 0 | 0 | 0 | 0 | 0 |
| 0.2.3 | 0 | 0 | 0 | 0 | 0 |
| 0.2.2 | 0 | 0 | 0 | 0 | 0 |
| 0.2.1 | 0 | 0 | 0 | 0 | 0 |
| 0.2.0 | 0 | 0 | 0 | 0 | 0 |
| 0.1.3 | 0 | 0 | 0 | 0 | 0 |
| 0.1.2 | 0 | 0 | 0 | 0 | 0 |
| 0.1.1 | 0 | 0 | 0 | 0 | 0 |
| 0.1.0 | 0 | 0 | 0 | 0 | 0 |
| 0.0.1 | 0 | 0 | 0 | 0 | 0 |
2.3.1 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0ByteSize is a semantic wrapper for byte count representations.
Features:
ByteSize type which presents size units convertible to different size units.ByteSize.FromStr impl for ByteSize, allowing for parsing string size representations like "1.5KiB" and "521TiB".Construction using SI or IEC helpers.
use bytesize::ByteSize;
assert!(ByteSize::kib(4) > ByteSize::kb(4));Display as human-readable string.
use bytesize::ByteSize;
assert_eq!("518.0 GiB", ByteSize::gib(518).display().iec().to_string());
assert_eq!("556.2 GB", ByteSize::gib(518).display().si().to_string());
assert_eq!("518.0G", ByteSize::gib(518).display().iec_short().to_string());Arithmetic operations are supported.
use bytesize::ByteSize;
let plus = ByteSize::mb(1) + ByteSize::kb(100);
println!("{plus}");
let minus = ByteSize::tb(1) - ByteSize::gb(4);
assert_eq!(ByteSize::gb(996), minus);