ByteSize
ByteSize copied to clipboard
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.
I'm trying to use this library to keep my code a bit more readable. If I do this: `var memoryBuffer = MemoryPool.Shared.Rent((int) ByteSize.FromKibiBytes(128).Bytes);` I have to cast .Bytes to an...
Not sure how useful AddKiloByte/AddKebibyte and their sibling methods are. These were added to mimic DateTime behavior (AddSeconds, AddMinutes, etc.), but with the addition of binary and decimal to the...
MebiBytes KiloBytes are single words and should be cased accordingly.
Incrementing or decrementing a ByteSize object by 1 byte doesn't seem to fit well with the overall design. 1 byte was an arbitrary value picked. Additionally, ByteSize was modeled after...
hey @omar @jetersen Can you provide exabyte and more? ``` EB | exabyte ZB | zettabyte YB | yottabyte ``` PS: really good lib Thanks
If I ByteSize.Parse("1689.1kb") I get the same value if I ByteSize.Parse("1689.1kB") One is kilobits the other is kiloBytes, yet ByteSize seems to treat b and B the same. Also if...
I love this library and would like to see a recipe version to not require a package reference that is passed downstream. A recipe will install the CS file as...
Example: ```csharp ByteSize size = ByteSize.FromBytes(1000); TimeSpan time = TimeSpan.FromSeconds(5); // use dotnet operator overloading to support basic operations (/, *) for various combinations of: ByteSpeed speed = (ByteSize) size...
Hi, This is preventing us from calling the byteSize dll from a strong name assembly file (signed code can't call unsigned code). Can you please sign your binary?
The KiloByteSymbol in DecimalByteSize.cs ([line 14](https://github.com/omar/ByteSize/blob/30bf7f1dba81e57326433647eaf27e2ba4a1a215/src/ByteSizeLib/DecimalByteSize.cs#L14)) is incorrectly declared as "KB". The uppercase "K", is considered an informal (non-standard) notation for 1024 bytes (=KiB). The correct unit prefix for 1000...