#include <ZBitStream.h>
Public Member Functions | |
bool | WriteBits (const ZStreamW &iStream, size_t iCountBits, uint32 iBits) |
Write the low iCountBits from iBits to iStream. | |
void | WriteBits (void *iDest, size_t iCountBits, uint32 iBits, size_t *oCountBytesWritten) |
Write the low iCountBits from iBits to iDest. | |
void | Finish (const ZStreamW &iStream) |
Flush the buffer by writing pending bits to iStream. | |
void | Finish (void *iDest, size_t *oCountBytesWritten) |
Flush the buffer by writing pending bits to iDest. |
Write the low iCountBits from iBits to iStream.
Bits are written one byte at a time, so are buffered by ZBitWriterLE until 8 are available. The bits in the stream are considered to be ordered from high to low within consecutive bytes, but are passed in from low to high.
void ZBitWriterLE::WriteBits | ( | void * | iDest, | |
size_t | iCountBits, | |||
uint32 | iBits, | |||
size_t * | oCountBytesWritten | |||
) |
Write the low iCountBits from iBits to iDest.
Bits are written one byte at a time, so are buffered by ZBitWriterLE until 8 are available. The number of bytes actually written is returned in oCountBytesWritten, and can of course be zero. The bits in memory are considered to be ordered from high to low within consecutive bytes, but are passed in from low to high.
void ZBitWriterLE::Finish | ( | void * | iDest, | |
size_t * | oCountBytesWritten | |||
) |
Flush the buffer by writing pending bits to iDest.
The number of bytes written is returned in oCountBytesWritten.