ZBitWriterLE Class Reference

ZBitWriterLE writes a bitstream to a ZStreamW or to memory in increments of 1 to 32 bits. More...

#include <ZBitStream.h>

List of all members.

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.


Detailed Description

ZBitWriterLE writes a bitstream to a ZStreamW or to memory in increments of 1 to 32 bits.

See also:
ZBitReaderLE


Member Function Documentation

bool ZBitWriterLE::WriteBits ( const ZStreamW iStream,
size_t  iCountBits,
uint32  iBits 
)

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.


The documentation for this class was generated from the following files:
Generated on Thu Jul 26 11:22:00 2007 for ZooLib by  doxygen 1.4.7