brson ยท GitHub

I know that I have not worked on this code, by no means I intend to stall this, but one thing that I found when looking through the CLI-parsing code: The current parse for byte units does not distinguish between GB or KB and GiB or KiB. Usually, GB=1000^3 bytes and GiB=1024^3 bytes for example, i.e. the difference between metric and binary systems. Maybe this was intended? The current system definitely keeps things simple.

TigerBeetle aligns everything as power-of-two multiples, so there isn't much practical use for decimal units (sure the user can input 1000000 bytes instead of 1MB, but it will be allocated as the closest power-of-two value anyway).
That said, we have the option of either accepting both MB and MiB as the same thing or being pedantic and not accepting decimal units at all, so for that reason, we choose the best experience over nomenclature.

As my personal opinion, KB, MB, GB and TB shouldn't exist as a unit for bytes, and should only be considered as a mistyped version of the correct ones KiB, MiB , GiB and TiB ๐Ÿ˜‚

image

Read the original on github.com โ†—