the byte count as a plain number
the base-unit form, e.g. "536870912B" -- valid CASC if fed back in
Staticfrommust be a non-negative safe integer
StaticparseParses byte-size literal text ("512MiB"), with the same rules and
errors as a bare literal in a CASC file.
A CASC byte size (CASC.md ยง6.9) --
512MiB,10GB,!bytes("1.5GiB"). Mirrors the Elixir implementation's{:bytes, count}, with the count held as abigintso that every literal the spec allows (up toPiB/PB, with any numeral) is represented exactly.The closest native JS fit is a plain number:
toNumber()(exact up toNumber.MAX_SAFE_INTEGER, about 8 PiB) andByteSize.fromNumber().