doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
idCompressor_BitStream Class Reference
Inheritance diagram for idCompressor_BitStream:
idCompressor_None idCompressor idFile idCompressor_Arithmetic idCompressor_LZSS idCompressor_LZW idCompressor_RunLength idCompressor_RunLength_ZeroBased idCompressor_LZSS_WordAligned

Public Member Functions

 idCompressor_BitStream (void)
 
void Init (idFile *f, bool compress, int wordLength)
 
void FinishCompress (void)
 
float GetCompressionRatio (void) const
 
int Write (const void *inData, int inLength)
 
int Read (void *outData, int outLength)
 
- Public Member Functions inherited from idCompressor_None
 idCompressor_None (void)
 
const char * GetName (void)
 
const char * GetFullPath (void)
 
int Length (void)
 
ID_TIME_T Timestamp (void)
 
int Tell (void)
 
void ForceFlush (void)
 
void Flush (void)
 
int Seek (long offset, fsOrigin_t origin)
 
- Public Member Functions inherited from idFile
virtual ~idFile (void)
 
virtual void Rewind (void)
 
virtual int Printf (const char *fmt,...) id_attribute((format(printf
 
virtual int virtual int VPrintf (const char *fmt, va_list arg)
 
virtual int WriteFloatString (const char *fmt,...) id_attribute((format(printf
 
virtual int virtual int ReadInt (int &value)
 
virtual int ReadUnsignedInt (unsigned int &value)
 
virtual int ReadShort (short &value)
 
virtual int ReadUnsignedShort (unsigned short &value)
 
virtual int ReadChar (char &value)
 
virtual int ReadUnsignedChar (unsigned char &value)
 
virtual int ReadFloat (float &value)
 
virtual int ReadBool (bool &value)
 
virtual int ReadString (idStr &string)
 
virtual int ReadVec2 (idVec2 &vec)
 
virtual int ReadVec3 (idVec3 &vec)
 
virtual int ReadVec4 (idVec4 &vec)
 
virtual int ReadVec6 (idVec6 &vec)
 
virtual int ReadMat3 (idMat3 &mat)
 
virtual int WriteInt (const int value)
 
virtual int WriteUnsignedInt (const unsigned int value)
 
virtual int WriteShort (const short value)
 
virtual int WriteUnsignedShort (unsigned short value)
 
virtual int WriteChar (const char value)
 
virtual int WriteUnsignedChar (const unsigned char value)
 
virtual int WriteFloat (const float value)
 
virtual int WriteBool (const bool value)
 
virtual int WriteString (const char *string)
 
virtual int WriteVec2 (const idVec2 &vec)
 
virtual int WriteVec3 (const idVec3 &vec)
 
virtual int WriteVec4 (const idVec4 &vec)
 
virtual int WriteVec6 (const idVec6 &vec)
 
virtual int WriteMat3 (const idMat3 &mat)
 

Protected Member Functions

void InitCompress (const void *inData, const int inLength)
 
void InitDecompress (void *outData, int outLength)
 
void WriteBits (int value, int numBits)
 
int ReadBits (int numBits)
 
void UnreadBits (int numBits)
 
int Compare (const byte *src1, int bitPtr1, const byte *src2, int bitPtr2, int maxBits) const
 

Protected Attributes

byte buffer [65536]
 
int wordLength
 
int readTotalBytes
 
int readLength
 
int readByte
 
int readBit
 
const bytereadData
 
int writeTotalBytes
 
int writeLength
 
int writeByte
 
int writeBit
 
bytewriteData
 
- Protected Attributes inherited from idCompressor_None
idFilefile
 
bool compress
 

Additional Inherited Members

- Static Public Member Functions inherited from idCompressor
static idCompressorAllocNoCompression (void)
 
static idCompressorAllocBitStream (void)
 
static idCompressorAllocRunLength (void)
 
static idCompressorAllocRunLength_ZeroBased (void)
 
static idCompressorAllocHuffman (void)
 
static idCompressorAllocArithmetic (void)
 
static idCompressorAllocLZSS (void)
 
static idCompressorAllocLZSS_WordAligned (void)
 
static idCompressorAllocLZW (void)
 

Detailed Description

Definition at line 233 of file Compressor.cpp.

Constructor & Destructor Documentation

idCompressor_BitStream::idCompressor_BitStream ( void  )
inline

Definition at line 235 of file Compressor.cpp.

Member Function Documentation

int idCompressor_BitStream::Compare ( const byte src1,
int  bitPtr1,
const byte src2,
int  bitPtr2,
int  maxBits 
) const
protected

Definition at line 461 of file Compressor.cpp.

void idCompressor_BitStream::FinishCompress ( void  )
virtual

Reimplemented from idCompressor_None.

Reimplemented in idCompressor_LZW, idCompressor_LZSS, and idCompressor_Arithmetic.

Definition at line 553 of file Compressor.cpp.

float idCompressor_BitStream::GetCompressionRatio ( void  ) const
virtual

Reimplemented from idCompressor_None.

Definition at line 591 of file Compressor.cpp.

void idCompressor_BitStream::Init ( idFile f,
bool  compress,
int  wordLength 
)
virtual
ID_INLINE void idCompressor_BitStream::InitCompress ( const void inData,
const int  inLength 
)
protected

Definition at line 300 of file Compressor.cpp.

ID_INLINE void idCompressor_BitStream::InitDecompress ( void outData,
int  outLength 
)
protected

Definition at line 320 of file Compressor.cpp.

int idCompressor_BitStream::Read ( void outData,
int  outLength 
)
virtual
int idCompressor_BitStream::ReadBits ( int  numBits)
protected

Definition at line 387 of file Compressor.cpp.

void idCompressor_BitStream::UnreadBits ( int  numBits)
protected

Definition at line 437 of file Compressor.cpp.

int idCompressor_BitStream::Write ( const void inData,
int  inLength 
)
virtual
void idCompressor_BitStream::WriteBits ( int  value,
int  numBits 
)
protected

Definition at line 340 of file Compressor.cpp.

Member Data Documentation

byte idCompressor_BitStream::buffer[65536]
protected

Definition at line 245 of file Compressor.cpp.

int idCompressor_BitStream::readBit
protected

Definition at line 251 of file Compressor.cpp.

int idCompressor_BitStream::readByte
protected

Definition at line 250 of file Compressor.cpp.

const byte* idCompressor_BitStream::readData
protected

Definition at line 252 of file Compressor.cpp.

int idCompressor_BitStream::readLength
protected

Definition at line 249 of file Compressor.cpp.

int idCompressor_BitStream::readTotalBytes
protected

Definition at line 248 of file Compressor.cpp.

int idCompressor_BitStream::wordLength
protected

Definition at line 246 of file Compressor.cpp.

int idCompressor_BitStream::writeBit
protected

Definition at line 257 of file Compressor.cpp.

int idCompressor_BitStream::writeByte
protected

Definition at line 256 of file Compressor.cpp.

byte* idCompressor_BitStream::writeData
protected

Definition at line 258 of file Compressor.cpp.

int idCompressor_BitStream::writeLength
protected

Definition at line 255 of file Compressor.cpp.

int idCompressor_BitStream::writeTotalBytes
protected

Definition at line 254 of file Compressor.cpp.


The documentation for this class was generated from the following file: