This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package datasizeformatter | |
| import kotlin.math.abs | |
| import kotlin.math.pow | |
| import kotlin.math.roundToLong | |
| /** | |
| * Format a human-readable representation of data size, in binary base form. | |
| * e.g. 1024 -> 1 KiB | |
| * @param byteCount The number of bytes to represent in human-readable form. `Long.MIN_VALUE` is unsupported. |