The ByteSize type is used when a configuration field requires a size in bytes.
Sizes are specified by combining a floating point number with a size unit.
For example, 10 KiB can be specified as an inline table:
size = { size = 10.0, unit = "KiB" }
Or as a string:
This will result in a size of 10,240 bytes.
Available size units
| Unit | Name | Size in Bytes |
|---|
| B | BYTE | 1 |
| KiB | KIBIBYTE | 1,024 |
| MiB | MEBIBYTE | 1,048,576 |
| GiB | GIBIBYTE | 1,073,741,824 |
| kB | KILOBYTE | 1,000 |
| MB | MEGABYTE | 1,000,000 |
| GB | GIGABYTE | 1,000,000,000 |
The size will be rounded to the nearest byte.