Table of Contents

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

int

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

bool

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

value byte*
valueOffset int
bitLength int

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