Class BitWriter
- Namespace
- NLightning.Common.BitUtils
- Assembly
- NLightning.Common.dll
public class BitWriter : IDisposable
- Inheritance
-
BitWriter
- Implements
- Inherited Members
Constructors
BitWriter(int)
public BitWriter(int totalBits)
Parameters
totalBits
int
Properties
TotalBits
public int TotalBits { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~BitWriter()
protected ~BitWriter()
GrowByBits(int)
public void GrowByBits(int additionalBits)
Parameters
additionalBits
int
HasMoreBits(int)
public bool HasMoreBits(int requiredBits)
Parameters
requiredBits
int
Returns
SkipBits(int)
public void SkipBits(int v)
Parameters
v
int
ToArray()
public byte[] ToArray()
Returns
- byte[]
WriteBit(bool)
public void WriteBit(bool bit)
Parameters
bit
bool
WriteBits(byte*, int, int)
public void WriteBits(byte* value, int valueOffset, int bitLength)
Parameters
WriteBits(ReadOnlySpan<byte>, int)
public void WriteBits(ReadOnlySpan<byte> value, int bitLength)
Parameters
value
ReadOnlySpan<byte>bitLength
int
WriteBits(ReadOnlySpan<byte>, int, int)
public void WriteBits(ReadOnlySpan<byte> value, int valueOffset, int bitLength)
Parameters
value
ReadOnlySpan<byte>valueOffset
intbitLength
int
WriteByteAsBits(byte, int)
public void WriteByteAsBits(byte value, int bits)
Parameters
WriteInt16AsBits(short, int, bool)
public void WriteInt16AsBits(short value, int bits, bool bigEndian = true)
Parameters
WriteInt32AsBits(int, int, bool)
public void WriteInt32AsBits(int value, int bits, bool bigEndian = true)
Parameters
WriteInt64AsBits(long, int, bool)
public void WriteInt64AsBits(long value, int bits, bool bigEndian = true)
Parameters
WriteUInt16AsBits(ushort, int, bool)
public void WriteUInt16AsBits(ushort value, int bits, bool bigEndian = true)