ZBitWriterBE Class Reference

ZBitWriterBE 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

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

See also:
ZBitReaderBE


Member Function Documentation

bool ZBitWriterBE::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 ZBitWriterBE until 8 are available. The bits in the stream are considered to be ordered from low to high within consecutive bytes. Passing 16 or 32 bits at a time in iBits will thus put the data onto the stream in little endian order.

void ZBitWriterBE::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 ZBitWriterBE 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 low to high within consecutive bytes. Passing 16 or 32 bits at a time in iBits will thus put the data into memory in little endian order.

void ZBitWriterBE::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