Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Util.Collections.Bin128

Summary

Encapsulates a binary value 128 bits long. See Remarks.

Remarks

This type is significantly more memory-efficient compared to byte[16] when only one copy of the value needs to be stored. Specifically, the byte array uses four extra IntPtrs per instance, which, on a 64-bit platform, amounts to a three-fold RAM usage increase. It can also be compared for equality using just two integer comparisons in safe code.

Constructors

Bin128(byte[] bytes, int offset = 0)
Constructor. Initializes this value to contain the same data as the specified byte array.

Instance methods

bool
Equals(object other)
  • Overrides: object.Equals(object)
Compares an object to this value and returns true iff it's a Bin128 value that's equal.
int
  • Overrides: object.GetHashCode()
Gets the hash code for this value.
byte[]Returns the binary value as a byte array. This method is not very efficient.
string
  • Overrides: object.ToString()
Converts the binary value to a hexadecimal string representation.
void
Write(Stream stream)
Writes the value to the specified stream as 16 bytes.
void
Write(BinaryWriter bw)
Writes the value to the specified binary writer as 16 bytes.

Static methods

Bin128
Read(Stream stream)
Reads a 128-bit binary value from the specified stream.
Bin128
Read(BinaryReader br)
Reads a 128-bit binary value from the specified binary reader.

Operators

boolCompares the two values and returns true iff they are equal.
boolCompares the two values and returns true iff they are different.

Static fields

Bin128Gets a 128-bit binary value consisting of all zeroes.