ByteSize 2.0.0

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.

Install-Package ByteSize -Version 2.0.0
dotnet add package ByteSize --version 2.0.0
<PackageReference Include="ByteSize" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ByteSize --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ByteSize, 2.0.0"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes


By default `ByteSize` now assumes `1 KB == 1000 B` and `1 KiB == 1024 B` to
adhere to the IEC and NIST standards (
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`).
- New constructor that takes a `long` value as the number of bits.
- Support for culture on Parse and TryParse

View all release notes at

GitHub repositories (11)

Showing the top 5 popular GitHub repositories that depend on ByteSize:

Repository Stars
A modern file explorer that pushes the boundaries of the platform.
WOA Deployer for Raspberry Pi
This repository was deprecated, use:
A service for automated crash-dump analysis
Official ProtonVPN Windows app

Version History

Version Downloads Last updated
2.0.0 233,678 1/14/2020
1.3.0 382,050 1/22/2017
1.2.5 778 1/21/2017
1.2.4 2,525 11/25/2016
1.2.3 3,567 11/10/2016
1.2.2 1,175 10/28/2016
1.2.1 11,155 7/23/2016
1.2.0 1,660 6/18/2016
1.1.3 981 6/18/2016
1.1.2 2,329 3/22/2016
1.1.1 2,081 12/13/2015
1.1.0 6,555 8/20/2015
1.0.0 3,964 5/30/2015