Decimal Units
| Name | Unit | Total Bytes |
|---|---|---|
| Exabytes | EB | 1,000,000,000,000,000,000 |
| Petabytes | PB | 1,000,000,000,000,000 |
| Terabytes | TB | 1,000,000,000,000 |
| Gigabytes | GB | 1,000,000,000 |
| Megabytes | MB | 1,000,000 |
| Kilobytes | KB | 1,000 |
Binary Units
| Name | Unit | Magnitude | Total Bytes |
|---|---|---|---|
| Exbibyte | EiB | 2^60 | 1,152,921,504,606,846,976 |
| Pebibyte | PiB | 2^50 | 1,125,899,906,842,624 |
| Tebibyte | TiB | 2^40 | 1,099,511,627,776 |
| Gibibyte | GiB | 2^30 | 1,073,741,824 |
| Mebibyte | MiB | 2^20 | 1,048,576 |
| Kibibyte | KiB | 2^10 | 1,024 |
Generating Byte String
C++
inline static std::string
Python
= 1 << 10
= 1 << 20
= 1 << 30
= 1 << 40
= 1 << 50
= 1 << 60
return f
return f
return f
return f
return f
return f
return f