<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.0.0" />

BitCollection

public class BitCollection
Represents a collection of bit values.
public static int BITSPERBYTE

public byte[] Bytes { get; }

Gets the underlying byte array.

public BitCollection(int capacity)

Initialize a new instance of BitCollection with the specified capacity.

public static bool IsBitSet(byte[] bytes, int bitpos)

Indicates whether or not a particular bit is set within the provided byte array.

Calculates a byte index from the bit index via Floor(bitpos / 8).

public static void SetBit(byte[] bytes, int bitpos, bool state)

Sets the bit at the specified position to the specified state in the provided array.

Manipulates a BYTE array, but the specified index is treated as a BIT.

public void Invert(bool maintainInt32Bit = false)

Inverts the byte array, optionally maintaing the Int32 bit.

public void SetBit(int position)

Sets the bit at the specified position to True.

public string ToHexString()

Gets a hexidecimal string representation of this ByteArray.

public void UnsetBit(int position)

Sets the bit at the specified position to False.