This library makes byte quantities easier to work with by giving them a clear, unambiguous representation in code.
Supports both decimal (SI) and binary (IEC) units (See this).
- Decimal: 1 kilobyte (KB) equals 1,000 bytes. Supported units include
KB,MB,GB,TB, andPB. - Binary: 1 kibibyte (KiB) equals 1,024 bytes. Supported units include
KiB,MiB,GiB,TiB, andPiB.
It handles conversions and provides methods for creating and retrieving values for any of those units.
Check the API Docs