Class BitWriter
- Namespace
- NLightning.Common.BitUtils
- Assembly
- NLightning.Bolt11.dll
- Inheritance
-
BitWriter
- Inherited Members
-
Constructors
BitWriter(int)
public BitWriter(int totalBits)
Parameters
totalBits
int
Properties
TotalBits
public int TotalBits { get; }
Property Value
- int
Methods
GrowByBits(int)
public void GrowByBits(int additionalBits)
Parameters
additionalBits
int
HasMoreBits(int)
public bool HasMoreBits(int requiredBits)
Parameters
requiredBits
int
Returns
- bool
SkipBits(int)
public void SkipBits(int v)
Parameters
v
int
ToArray()
Returns
- byte[]
WriteBit(bool)
public void WriteBit(bool bit)
Parameters
bit
bool
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
int
bitLength
int
WriteByteAsBits(byte, int)
public void WriteByteAsBits(byte value, int bits)
Parameters
value
byte
bits
int
WriteInt16AsBits(short, int, bool)
public void WriteInt16AsBits(short value, int bits, bool bigEndian = true)
Parameters
value
short
bits
int
bigEndian
bool
WriteInt32AsBits(int, int, bool)
public void WriteInt32AsBits(int value, int bits, bool bigEndian = true)
Parameters
value
int
bits
int
bigEndian
bool
WriteInt64AsBits(long, int, bool)
public void WriteInt64AsBits(long value, int bits, bool bigEndian = true)
Parameters
value
long
bits
int
bigEndian
bool
WriteUInt16AsBits(ushort, int, bool)
public void WriteUInt16AsBits(ushort value, int bits, bool bigEndian = true)
Parameters
value
ushort
bits
int
bigEndian
bool