Import: units
The units import provides access to quick calculations for various byte units.
Note that this import uses base-2 terminology:
- One kilobyte is 1024 bytes
- One megabyte is 1024^2 = 1048576 bytes
- One gigabyte is 1024^3 = 1073741824 bytes
- One terabyte is 1024^4 = 1099511627776 bytes
- One petabyte is 1024^5 = 1125899906842624 bytes
units.kilobyte
The base-2 representation of a kilobyte (1024 bytes).
units.megabyte
The base-2 representation of a megabyte (1048576 bytes).
units.gigabyte
The base-2 representation of a gigabyte (1073741824 bytes).
units.terabyte
The base-2 representation of a terabyte (1099511627776 bytes).
units.petabyte
The base-2 representation of a petabyte (1125899906842624 bytes).