void Align(int bitAlign = 8) | Pads with zero bits up to the next multiple of bitAlign bits (8 by default). |
uint AlignAndFlush() | Aligns to a byte, writes out the partial last word and returns the byte count. |
void BackTrack(uint bitCount) | Moves the write position back by a number of bits. |
void Clear(uint[] data) | Resets the write position. A full clear, or passing a new buffer, also drops the old buffer and callback. |
void Clear(bool isFull = false) | Resets the write position. A full clear, or passing a new buffer, also drops the old buffer and callback. |
void CopyStateFrom(BitWriter copyFrom) | Copies another writer's position and scratch state, but not its buffer. |
static uint HostToNetwork(uint value) | Byte swap for word order. Leaves the value as is on little endian machines. |
void Initialize(BitWriter.GetMoreData getMoreData = null) | Starts writing into a buffer. The callback overload calls it at once for the first buffer and again when it fills, so it must not be null. |
void Initialize(uint[] data) | Starts writing into a buffer. The callback overload calls it at once for the first buffer and again when it fills, so it must not be null. |
void WriteBits(uint value, int writeCount) | Writes the low bits of a value. If the buffer fills with no callback it logs a fatal error and wraps to the start. |
void WriteBytes(byte[] bytes, int byteCount) | Writes a byte array, copying whole words directly when aligned. |