ByteSize Versions Save

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.

v2.1.2

4 months ago
  • Add strong name support

v2.1.1

2 years ago
  • Add documentation
  • Fix potential System.NullReferenceException in the ToString() methods

v2.1.0

2 years ago
  • Support multiple (*) and divide (/) operators of ByteSize object
  • Add ToString IFormattable parameter overload
  • Add target for .NET 5

v2.0.0

4 years ago

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:

  • Renamed property LargestWholeNumberSymbol and LargestWholeNumberValue to LargestWholeNumberDecimalSymbol and LargestWholeNumberDecimalValue respectively.
  • Drop support for all platforms except netstandard1.0 and net45.

New Features:

  • Support for binary and decimal values (e.g. ByteSize.FromKibiByte and ByteSize.FromKiloByte). (#24 by @omar)
  • New constructor that takes a long value as the number of bits.
  • Support for culture on Parse and TryParse. (#39 by @P-Storm)

v1.3.0

7 years ago
  • Add support for subtracting two ByteSize objects. (#25 by @omar)

v1.2.5

7 years ago
  • Properly support .NET Standard 1.0. (#29 by @jp7677)

v1.2.4

7 years ago
  • Fix TryParse to not throw exceptions. (#23 by @omar)

v1.2.3

7 years ago
  • Fix ByteSize of zero ToString output. (#21 by @omar)

v1.2.2

7 years ago
  • Improve memory footprint of a ByteSize object. (#20 by @atifaziz)

v1.2.1

7 years ago
  • Fix parsing of numbers with group number separator like 1,500.65 mb. (#17 by @omar)