BPack Class Reference

#include <BByteStream.h>

List of all members.


Detailed Description

The BPack class is very similar to BByteStream, but without the restrictions on bits_per_sample. BPack supports anything in the range of 2-31. I haven't done the benchmarks to determine which is faster for the values of bits_per_sample that both classes support (9,10,12). I suspect that the answer to that question would be platform-dependent, but I have no hard data to back that up.

This class is based on a subset of the functions in BVarStream. Unlike BVarStream, however, this class is meant to encode samples of fixed length.

Definition at line 343 of file BByteStream.h.

Public Member Functions

 BPack ()
 ~BPack ()
void InitWrite (int size, void *pointer)
void InitRead (int size, const void *pointer)
void Put (int numbits, int val)
int Get (int numbits)
int NumBytes () const
void SetCanReallocate (int val) alter
int GetStatus () const
void SwapBytes ()


Member Function Documentation

void BPack::InitRead int  size,
const void *  pointer
[inline]
 

We have a buffer that we would like to use varstream to read from. matching this call with a vsfree is unnecessary (but would do no harm). pointer must be 4-byte aligned.

Definition at line 435 of file BByteStream.h.

void BPack::InitWrite int  size,
void *  pointer
[inline]
 

We already have a buffer that we would like to use varstream to fill w/ data. matching this call with a vsfree is unnecessary (but would do no harm). pointer must be 4-byte aligned.

Definition at line 423 of file BByteStream.h.

void BPack::SwapBytes  )  [inline]
 

Account for big endian systems. Call after the last Put() or before the first Get()

Definition at line 490 of file BByteStream.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:38 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5