Represents a null bit buffer for writing data.
More...
Inherits INetBitWriteStream.
|
void | PadToByteBoundary () |
| Pads the buffer to the next byte boundary by writing zero bits if necessary. More...
|
|
bool | WriteBoolean (bool b) |
| Writes a boolean value to the buffer and increments the offset by 1 bit. More...
|
|
void | WriteByte (byte value, int bits=8) |
| Writes a byte value to the buffer and increments the offset by the specified number of bits. More...
|
|
unsafe void | WriteBytesAligned (void *buffer, int length) |
| Writes a specified number of bytes from a buffer to the bit buffer, ensuring byte alignment. More...
|
|
void | WriteInt32 (int value, int bits=32) |
| Writes a 32-bit integer value to the buffer and increments the offset by the specified number of bits. More...
|
|
void | WriteInt32VarLength (int value) |
| Writes a 32-bit integer value with variable length encoding. More...
|
|
void | WriteInt32VarLength (int value, int blockSize) |
| Writes a 32-bit integer value with variable length encoding and a specified block size. More...
|
|
void | WriteUInt32VarLength (uint value) |
| Writes a 32-bit unsigned integer value with variable length encoding. More...
|
|
void | WriteUInt32VarLength (uint value, int blockSize) |
| Writes a 32-bit unsigned integer value with variable length encoding and a specified block size. More...
|
|
void | WriteUInt64VarLength (ulong value, int blockSize) |
| Writes a 64-bit unsigned integer value with variable length encoding and a specified block size. More...
|
|
Represents a null bit buffer for writing data.
◆ PadToByteBoundary()
void PadToByteBoundary |
( |
| ) |
|
Pads the buffer to the next byte boundary by writing zero bits if necessary.
◆ WriteBoolean()
bool WriteBoolean |
( |
bool |
b | ) |
|
Writes a boolean value to the buffer and increments the offset by 1 bit.
- Parameters
-
b | The boolean value to write. |
- Returns
- The boolean value that was written.
Implements INetBitWriteStream.
◆ WriteByte()
void WriteByte |
( |
byte |
value, |
|
|
int |
bits = 8 |
|
) |
| |
Writes a byte value to the buffer and increments the offset by the specified number of bits.
- Parameters
-
value | The byte value to write. |
bits | The number of bits to write. Default is 8. |
◆ WriteBytesAligned()
unsafe void WriteBytesAligned |
( |
void * |
buffer, |
|
|
int |
length |
|
) |
| |
Writes a specified number of bytes from a buffer to the bit buffer, ensuring byte alignment.
- Parameters
-
buffer | A pointer to the buffer containing the bytes to write. |
length | The number of bytes to write. |
Implements INetBitWriteStream.
◆ WriteInt32()
void WriteInt32 |
( |
int |
value, |
|
|
int |
bits = 32 |
|
) |
| |
Writes a 32-bit integer value to the buffer and increments the offset by the specified number of bits.
- Parameters
-
value | The 32-bit integer value to write. |
bits | The number of bits to write. Default is 32. |
Implements INetBitWriteStream.
◆ WriteInt32VarLength() [1/2]
void WriteInt32VarLength |
( |
int |
value | ) |
|
Writes a 32-bit integer value with variable length encoding.
- Parameters
-
value | The 32-bit integer value to write. |
Implements INetBitWriteStream.
◆ WriteInt32VarLength() [2/2]
void WriteInt32VarLength |
( |
int |
value, |
|
|
int |
blockSize |
|
) |
| |
Writes a 32-bit integer value with variable length encoding and a specified block size.
- Parameters
-
value | The 32-bit integer value to write. |
blockSize | The block size for encoding. |
Implements INetBitWriteStream.
◆ WriteUInt32VarLength() [1/2]
void WriteUInt32VarLength |
( |
uint |
value | ) |
|
Writes a 32-bit unsigned integer value with variable length encoding.
- Parameters
-
value | The 32-bit unsigned integer value to write. |
◆ WriteUInt32VarLength() [2/2]
void WriteUInt32VarLength |
( |
uint |
value, |
|
|
int |
blockSize |
|
) |
| |
Writes a 32-bit unsigned integer value with variable length encoding and a specified block size.
- Parameters
-
value | The 32-bit unsigned integer value to write. |
blockSize | The block size for encoding. |
◆ WriteUInt64VarLength()
void WriteUInt64VarLength |
( |
ulong |
value, |
|
|
int |
blockSize |
|
) |
| |
Writes a 64-bit unsigned integer value with variable length encoding and a specified block size.
- Parameters
-
value | The 64-bit unsigned integer value to write. |
blockSize | The block size for encoding. |
Implements INetBitWriteStream.
◆ OffsetBits
Gets or sets the offset in bits.
The current offset in bits.