Class BitBuffer
- Namespace
- ReFuel.Collections
- Assembly
- ReFuel.Common.dll
Compact boolean storage type.
public class BitBuffer : IEnumerable<bool>, IEnumerable
- Inheritance
-
BitBuffer
- Implements
- Inherited Members
Constructors
BitBuffer()
public BitBuffer()
BitBuffer(int)
public BitBuffer(int capacity)
Parameters
capacityint
Properties
Capacity
Current capacity of the collection.
public int Capacity { get; }
Property Value
this[int]
Access the nth bit.
public bool this[int i] { get; set; }
Parameters
iintThe bit index.
Property Value
Max
Maximum bit index ever set.
public int Max { get; }
Property Value
Methods
Clear()
public void Clear()
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<bool> GetEnumerator()
Returns
- IEnumerator<bool>
An enumerator that can be used to iterate through the collection.
Reset(int)
Reset a bit.
public void Reset(int i)
Parameters
iintBit index to reset.
Set(int)
Set a bit.
public void Set(int i)
Parameters
iintBit index to set.
Toggle(int)
Toggle bit state.
public void Toggle(int i)
Parameters
iintBit index to toggle.
Trim()
Trim unused bits from the tail end of the structure.
public void Trim()