Class BitFieldArray
A packed array of length fixed-width unsigned indices, bits each, laid out LSB-first across a
byte stream (Java: BitFieldArr). Index i's low bit sits at bit (ibits) % 8 of byte
(ibits) / 8; a value that straddles a byte boundary spills its remaining high bits into the next
byte starting at bit 0. Backing size is ceil(length*bits / 8) bytes.
public sealed class BitFieldArray
- Inheritance
-
BitFieldArray
- Inherited Members
Constructors
BitFieldArray(int, int)
public BitFieldArray(int bits, int length)
Parameters
Properties
ByteLength
The packed byte length (what the wire records before the bytes).
public int ByteLength { get; }
Property Value
Bytes
The packed bytes, ready to copy onto the wire.
public ReadOnlySpan<byte> Bytes { get; }
Property Value
Length
The number of cells.
public int Length { get; }
Property Value
Methods
Get(int)
public int Get(int index)
Parameters
indexint
Returns
Set(int, int)
public void Set(int index, int value)