ByteSize is a utility class that makes byte size representation in code easier by removing ambiguity of the value being represented. ByteSize is to bytes what System.TimeSpan is to time.
HUGE BREAKING CHANGE:
By default ByteSize
now assumes 1 KB == 1000 B
and 1 KiB == 1024 B
to
adhere to the IEC and NIST standards (https://en.wikipedia.org/wiki/Binary_prefix).
In the past ByteSize
assumed 1 KB == 1024 B
, that means if you're upgrading
from v1, you'll see differences in values.
Other Breaking Changes:
LargestWholeNumberSymbol
and LargestWholeNumberValue
to LargestWholeNumberDecimalSymbol
and LargestWholeNumberDecimalValue
respectively.netstandard1.0
and net45
.New Features:
ByteSize.FromKibiByte
and ByteSize.FromKiloByte
). (#24 by @omar)long
value as the number of bits.1,500.65 mb
. (#17 by @omar)