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_LZSS Class Reference
Inheritance diagram for idCompressor_LZSS:
idCompressor_BitStream idCompressor_None idCompressor idFile idCompressor_LZSS_WordAligned

Public Member Functions

 idCompressor_LZSS (void)
 
void Init (idFile *f, bool compress, int wordLength)
 
void FinishCompress (void)
 
int Write (const void *inData, int inLength)
 
int Read (void *outData, int outLength)
 
- Public Member Functions inherited from idCompressor_BitStream
 idCompressor_BitStream (void)
 
float GetCompressionRatio (void) const
 
- 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

bool FindMatch (int startWord, int startValue, int &wordOffset, int &numWords)
 
void AddToHash (int index, int hash)
 
int GetWordFromBlock (int wordOffset) const
 
virtual void CompressBlock (void)
 
virtual void DecompressBlock (void)
 
- Protected Member Functions inherited from idCompressor_BitStream
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

int offsetBits
 
int lengthBits
 
int minMatchWords
 
byte block [LZSS_BLOCK_SIZE]
 
int blockSize
 
int blockIndex
 
int hashTable [LZSS_HASH_SIZE]
 
int hashNext [LZSS_BLOCK_SIZE *8]
 
- Protected Attributes inherited from idCompressor_BitStream
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 1806 of file Compressor.cpp.

Constructor & Destructor Documentation

idCompressor_LZSS::idCompressor_LZSS ( void  )
inline

Definition at line 1808 of file Compressor.cpp.

Member Function Documentation

void idCompressor_LZSS::AddToHash ( int  index,
int  hash 
)
protected

Definition at line 1887 of file Compressor.cpp.

void idCompressor_LZSS::CompressBlock ( void  )
protectedvirtual

Reimplemented in idCompressor_LZSS_WordAligned.

Definition at line 1936 of file Compressor.cpp.

void idCompressor_LZSS::DecompressBlock ( void  )
protectedvirtual

Reimplemented in idCompressor_LZSS_WordAligned.

Definition at line 1973 of file Compressor.cpp.

bool idCompressor_LZSS::FindMatch ( int  startWord,
int  startValue,
int wordOffset,
int numWords 
)
protected

Definition at line 1857 of file Compressor.cpp.

void idCompressor_LZSS::FinishCompress ( void  )
virtual

Reimplemented from idCompressor_BitStream.

Definition at line 2030 of file Compressor.cpp.

int idCompressor_LZSS::GetWordFromBlock ( int  wordOffset) const
protected

Definition at line 1897 of file Compressor.cpp.

void idCompressor_LZSS::Init ( idFile f,
bool  compress,
int  wordLength 
)
virtual

Reimplemented from idCompressor_BitStream.

Reimplemented in idCompressor_LZSS_WordAligned.

Definition at line 1841 of file Compressor.cpp.

int idCompressor_LZSS::Read ( void outData,
int  outLength 
)
virtual

Reimplemented from idCompressor_BitStream.

Definition at line 2045 of file Compressor.cpp.

int idCompressor_LZSS::Write ( const void inData,
int  inLength 
)
virtual

Reimplemented from idCompressor_BitStream.

Definition at line 2001 of file Compressor.cpp.

Member Data Documentation

byte idCompressor_LZSS::block[LZSS_BLOCK_SIZE]
protected

Definition at line 1821 of file Compressor.cpp.

int idCompressor_LZSS::blockIndex
protected

Definition at line 1823 of file Compressor.cpp.

int idCompressor_LZSS::blockSize
protected

Definition at line 1822 of file Compressor.cpp.

int idCompressor_LZSS::hashNext[LZSS_BLOCK_SIZE *8]
protected

Definition at line 1826 of file Compressor.cpp.

int idCompressor_LZSS::hashTable[LZSS_HASH_SIZE]
protected

Definition at line 1825 of file Compressor.cpp.

int idCompressor_LZSS::lengthBits
protected

Definition at line 1818 of file Compressor.cpp.

int idCompressor_LZSS::minMatchWords
protected

Definition at line 1819 of file Compressor.cpp.

int idCompressor_LZSS::offsetBits
protected

Definition at line 1817 of file Compressor.cpp.


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