Class BitArrayWriter
- Namespace
- Ecng.Collections
- Assembly
- Ecng.Collections.dll
Provides a writer for bit-level data to a stream.
public class BitArrayWriter : Disposable, IDisposable
- Inheritance
-
BitArrayWriter
- Implements
- Inherited Members
- Extension Methods
Constructors
BitArrayWriter(Stream)
Provides a writer for bit-level data to a stream.
public BitArrayWriter(Stream underlyingStream)
Parameters
underlyingStream
Stream
Methods
DisposeManaged()
Disposes the writer, ensuring any remaining bits are flushed to the stream.
protected override void DisposeManaged()
Write(bool)
Writes a single bit to the stream.
public void Write(bool bit)
Parameters
bit
boolThe bit to write.
WriteBits(int, int)
Writes a specified number of bits from an integer value to the stream.
public void WriteBits(int value, int bitCount)
Parameters
WriteBits(long, int)
Writes a specified number of bits from a long integer value to the stream.
public void WriteBits(long value, int bitCount)
Parameters
WriteDecimal(decimal)
Writes a decimal value to the stream.
public void WriteDecimal(decimal value)
Parameters
value
decimalThe decimal value to write.
WriteInt(int)
Writes an integer value to the stream using a variable-length encoding.
public void WriteInt(int value)
Parameters
value
intThe integer value to write.
WriteLong(long)
Writes a long integer value to the stream using a variable-length encoding.
public void WriteLong(long value)
Parameters
value
longThe long integer value to write.