# Prose.ByteSize struct

Namespace: [Grasshopper2](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public struct Prose.ByteSize : IComparable<Prose.ByteSize>, IEquatable<Prose.ByteSize>
```

Provides utility methods for converting and formatting bits and bytes. Code copied from: https://github.com/omar/ByteSize

## Constructors

- [Prose.ByteSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/ctor.md): Create a new bytesize.

## Fields

- [BitsInByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bitsinbyte.md): (static) The number of bits in a byte.
- [BitSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bitsymbol.md): (static) Bit unit symbol.
- [BytesInGigaByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesingigabyte.md): (static) The number of bytes in a gigabyte.
- [BytesInKiloByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesinkilobyte.md): (static) The number of bytes in a kilobyte.
- [BytesInMegaByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesinmegabyte.md): (static) The number of bytes in a megabyte.
- [BytesInPetaByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesinpetabyte.md): (static) The number of bytes in a petabyte.
- [BytesInTeraByte](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesinterabyte.md): (static) The number of bytes in a terabyte.
- [ByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytesymbol.md): (static) Byte unit symbol.
- [GigaByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/gigabytesymbol.md): (static) Gigabyte unit symbol.
- [KiloByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/kilobytesymbol.md): (static) Kilobyte unit symbol.
- [MaxValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/maxvalue.md): (static) Largest representable size.
- [MegaByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/megabytesymbol.md): (static) Megabyte unit symbol.
- [MinValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/minvalue.md): (static) Smallest representable size.
- [PetaByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/petabytesymbol.md): (static) Petabyte unit symbol.
- [TeraByteSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/terabytesymbol.md): (static) Terabyte unit symbol.

## Properties

- [Bits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bits.md): Gets the total number of bits in this size.
- [Bytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/bytes.md): Gets the total number of bytes in this size.
- [GigaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/gigabytes.md): Gets the total number of gigabytes in this size.
- [KiloBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/kilobytes.md): Gets the total number of kilobytes in this size.
- [LargestWholeNumberSymbol](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/largestwholenumbersymbol.md): Gets the unit symbol which represents the largest non-zero amount.
- [LargestWholeNumberValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/largestwholenumbervalue.md): Gets the amount of the largest non-zero unit.
- [MegaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/megabytes.md): Gets the total number of megabytes in this size.
- [PetaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/petabytes.md): Gets the total number of petabytes in this size.
- [TeraBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/terabytes.md): Gets the total number of terabytes in this size.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/add.md): Add to this size.
- [AddBits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addbits.md): Add to this size.
- [AddBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addbytes.md): Add to this size.
- [AddGigaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addgigabytes.md): Add to this size.
- [AddKiloBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addkilobytes.md): Add to this size.
- [AddMegaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addmegabytes.md): Add to this size.
- [AddPetaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addpetabytes.md): Add to this size.
- [AddTeraBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/addterabytes.md): Add to this size.
- [CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/compareto.md): Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/equals.md): (2 overloads) Test for equality.
- [FromBits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/frombits.md): (static) Create a ByteSize instance from a number of bits.
- [FromBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/frombytes.md): (static) Create a ByteSize instance from a number of bytes.
- [FromGigaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/fromgigabytes.md): (static) Create a ByteSize instance from a number of megabytes.
- [FromKiloBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/fromkilobytes.md): (static) Create a ByteSize instance from a number of kilobytes.
- [FromMegaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/frommegabytes.md): (static) Create a ByteSize instance from a number of megabytes.
- [FromPetaBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/frompetabytes.md): (static) Create a ByteSize instance from a number of petabytes.
- [FromTeraBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/fromterabytes.md): (static) Create a ByteSize instance from a number of terabytes.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/gethashcode.md): Returns the hash code for this instance.
- [Parse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/parse.md): (static) Parse a string representing a size.
- [Subtract](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/subtract.md): Add to this size.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/tostring.md): (2 overloads) Converts the value of the current ByteSize object to a string. The metric prefix symbol (bit, byte, kilo, mega, giga, tera) used is the largest metric prefix such that the corresponding value is greater than or equal to one.
- [TryParse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/tryparse.md): (static) Try to parse a string representing a size.

## Operators

- [operator +](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-addition.md): (static) Add two sizes.
- [operator ==](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-equality.md): (static) Test two sizes for equality.
- [operator >](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-greaterthan.md): (static) Test two sizes for larger than ness.
- [operator >=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-greaterthanorequal.md): (static) Test two sizes for larger than ness.
- [operator !=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-inequality.md): (static) Test two sizes for inequality.
- [operator <](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-lessthan.md): (static) Test two sizes for smaller than ness.
- [operator <=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-lessthanorequal.md): (static) Test two sizes for smaller than ness.
- [operator -](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-subtraction.md): (static) Subtract two sizes.
- [operator -](https://developer.rhino3d.com/api/gh2/type/grasshopper2.prose.bytesize/op-unarynegation.md): (static) Negate a size.
