Overview Chapter

class CDXPacker

Operations
ExpandSurface Expands a special packed filepointer to a CDXSurface, befor allocated!
ExpandSurface Expands a special packed file to a CDXSurface, befor allocated!
ExpandTo Expands a filepointer with help of an callback function for writing each byte.
ExpandTo Expands a file with help of an callback function for writing each byte.
ExpandToFile Expands a file(in) to a file(out).
ExpandToRam Expands a filepointer to ram, with allocating ram.
ExpandToRam Expands a file to ram, with allocating ram.
FileInfo Gets the info from a File, Reads Header and fills the Vars.
FilePtrInfo Gets the info from a Filepointer, Reads Header and fills the Vars.
PackFile Packs a File from 'in' to 'out'.
PackRam Packs a rampointer into a file.
PackTo Packs to a file with an use of CALLBACK function for each BYTE.
BinarySearchPos
BinarySearchSym
Decode
DecodeChar
DecodePosition
DeleteNode
Encode
EncodeChar
EncodeEnd
EncodePosition
FlushBitBuffer
GetBit Internal Expand Routinez (don't call them in your apps).
Init Inits the Packing vars ( Internal ).
InitTree
InsertNode
Output
PutBit Internal Compress Routinez (don't call them in your apps).
ReadHeader Reads File header ( internal ).
SpecRead Reads a byte from File/Ram/Spec.
SpecWrite Writes a byte to File/Ram/Spec.
StartDecode
StartModel Internal Routinez needed by Encode and Decode (don't call them in your apps).
UpdateModel
WriteHeader Writes File header ( internal ).
   
                      
Data Members
public
BYTE bpp;
DWORD textsize, codesize, width, height;
   
private
FILE* fin, * fout;
int match_position, match_length, shifts, lson [ N + 1 ], rson [ N + 257 ], dad [ N + 1 ], char_to_sym [ ( 256 - THRESHOLD + F ) ], sym_to_char [ ( 256 - THRESHOLD + F ) + 1 ];
void* m_data;
EXPANDPROC m_lpEProc;
PACKPROC m_lpPProc;
DWORD pos, mode;
BYTE* ramptr;
WORD sym_freq [ ( 256 - THRESHOLD + F ) + 1 ], sym_cum [ ( 256 - THRESHOLD + F ) + 1 ], position_cum [ N + 1 ], buffer, mask;
BYTE text_buf [ N + F - 1 ];
DWORD low, high, value;