Class BitReader
- Namespace
- NLightning.Common.BitUtils
- Assembly
- NLightning.Bolt11.dll
- Inheritance
-
BitReader
- Inherited Members
-
Constructors
BitReader(byte[])
public BitReader(byte[] buffer)
Parameters
buffer
byte[]
Methods
HasMoreBits(int)
public bool HasMoreBits(int requiredBits)
Parameters
requiredBits
int
Returns
- bool
ReadBit()
Returns
- bool
ReadBits(Span<byte>, int)
public int ReadBits(Span<byte> value, int bitLength)
Parameters
value
Span<byte>
bitLength
int
Returns
- int
ReadByteFromBits(int)
public byte ReadByteFromBits(int bits)
Parameters
bits
int
Returns
- byte
ReadInt16FromBits(int, bool)
public short ReadInt16FromBits(int bits, bool bigEndian = true)
Parameters
bits
int
bigEndian
bool
Returns
- short
ReadInt32FromBits(int, bool)
public int ReadInt32FromBits(int bits, bool bigEndian = true)
Parameters
bits
int
bigEndian
bool
Returns
- int
ReadInt64FromBits(int, bool)
public long ReadInt64FromBits(int bits, bool bigEndian = true)
Parameters
bits
int
bigEndian
bool
Returns
- long
ReadUInt16FromBits(int, bool)
public ushort ReadUInt16FromBits(int bits, bool bigEndian = true)
Parameters
bits
int
bigEndian
bool
Returns
- ushort
SkipBits(int)
public void SkipBits(int v)
Parameters
v
int