Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ppm_worker Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-reader/ppm.h>

Collaboration diagram for ppm_worker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

int PPM_Init (unsigned short)
void PPM_End (void)
int PPM_Decode (void)

Public Attributes

ArithClass arith

Private Member Functions

void Node_Free (UINT p)
UINT Node_Alloc (void)
void Context_DeleteLast (void)
void Context_MoveFirst (UINT c)
void Context_New (int sym, int order)
void Context_NewSym (int sym, UINT c)
UINT Context_Search (int order)
void Context_Renorm (UINT ctx)
void Hash_Update (int sym)
void Sym_ExcludeReset (void)
int Decode_NewSym (void)
int Decode_NoExclude (UINT ctx)
int Decode_Exclude (UINT ctx)

Private Attributes

NODEnode_heap
UINT node_free_nb
UINT node_free_first
UINT node_free_last
USHORThash_table
UINT ctx_first
UINT ctx_last
UINT ctx_nb
UCHAR sym_context [ORDER_MAX+1]
int sym_hash [ORDER_MAX+1]
UCHAR sym_excl [SYM_NB]
UCHAR sym_excl_code

Member Function Documentation

void ppm_worker::Context_DeleteLast void   )  [private]
 

Definition at line 68 of file ppm.cpp.

References ctx_last, ctx_nb, CTXHDR::ctx_prev, HASH_ADDRESS, CTXHDR::hash_next, hash_table, _NODE::hdr, NIL, Node_Free(), node_heap, p, _NODE::sf, CTXHDR::sf, CTXHDR::sf_max, and CTXSYMFREQ::sf_next.

Referenced by Node_Alloc().

void ppm_worker::Context_MoveFirst UINT  c  )  [private]
 

Definition at line 46 of file ppm.cpp.

References ctx_first, ctx_last, CTXHDR::ctx_next, CTXHDR::ctx_prev, _NODE::hdr, and node_heap.

Referenced by PPM_Decode().

void ppm_worker::Context_New int  sym,
int  order
[private]
 

Definition at line 109 of file ppm.cpp.

References ctx_first, ctx_nb, CTXHDR::ctx_next, CTXHDR::ctx_prev, SYMFREQ::freq, CTXHDR::hash_next, hash_table, _NODE::hdr, i, Node_Alloc(), node_heap, CTXHDR::order, printf, CTXHDR::sf, CTXHDR::sf_max, SYMFREQ::sym, CTXHDR::sym, sym_context, and sym_hash.

Referenced by PPM_Decode().

void ppm_worker::Context_NewSym int  sym,
UINT  c
[private]
 

Definition at line 146 of file ppm.cpp.

References SYMFREQ::freq, _NODE::hdr, NIL, Node_Alloc(), node_heap, NODE_SFNB, p, printf, CTXSYMFREQ::sf, _NODE::sf, CTXHDR::sf, CTXHDR::sf_max, CTXSYMFREQ::sf_next, and SYMFREQ::sym.

Referenced by PPM_Decode().

void ppm_worker::Context_Renorm UINT  ctx  )  [private]
 

Definition at line 278 of file ppm.cpp.

References SYMFREQ::freq, i, node_heap, p, printf, s, SF_Read, and SYM_NB.

UINT ppm_worker::Context_Search int  order  )  [private]
 

Definition at line 206 of file ppm.cpp.

References HASH_ADDRESS, CTXHDR::hash_next, hash_table, _NODE::hdr, i, node_heap, CTXHDR::order, p, printf, CTXHDR::sym, sym_context, and sym_hash.

Referenced by PPM_Decode().

int ppm_worker::Decode_Exclude UINT  ctx  )  [private]
 

Definition at line 537 of file ppm.cpp.

References code, f, SYMFREQ::freq, node_heap, p, s, SF_Read, SYMFREQ::sym, sym_excl, and sym_excl_code.

Referenced by PPM_Decode().

int ppm_worker::Decode_NewSym void   )  [private]
 

Definition at line 447 of file ppm.cpp.

References arith, ArithClass::Arith_Decode(), ArithClass::Arith_DecodeVal(), code, f, i, sym_excl, sym_excl_code, SYM_NB, and SYM_SPECIAL_NB.

Referenced by PPM_Decode().

int ppm_worker::Decode_NoExclude UINT  ctx  )  [private]
 

Definition at line 477 of file ppm.cpp.

References arith, ArithClass::Arith_Decode(), ArithClass::Arith_DecodeVal(), code, f, SYMFREQ::freq, _NODE::hdr, HDR_SFNB, i, node_heap, p, s, CTXHDR::sf, CTXHDR::sf_max, SF_Read, SYMFREQ::sym, SYM_ESCAPE, sym_excl, and sym_excl_code.

Referenced by PPM_Decode().

void ppm_worker::Hash_Update int  sym  )  [private]
 

Definition at line 354 of file ppm.cpp.

References HASH_SIZE, i, ORDER_MAX, sym_context, and sym_hash.

Referenced by PPM_Decode().

UINT ppm_worker::Node_Alloc void   )  [private]
 

Definition at line 26 of file ppm.cpp.

References Context_DeleteLast(), _NODE::free_next, node_free_first, node_free_nb, node_heap, p, and printf.

Referenced by Context_New(), and Context_NewSym().

void ppm_worker::Node_Free UINT  p  )  [private]
 

Definition at line 14 of file ppm.cpp.

References _NODE::free_next, NIL, node_free_last, node_free_nb, and node_heap.

Referenced by Context_DeleteLast().

int ppm_worker::PPM_Decode void   ) 
 

Definition at line 607 of file ppm.cpp.

References Context_MoveFirst(), Context_New(), Context_NewSym(), Context_Search(), ctx_last, Decode_Exclude(), Decode_NewSym(), Decode_NoExclude(), HASH_ADDRESS, Hash_Update(), i, NIL, ORDER_MAX, SYM_ESCAPE, Sym_ExcludeReset(), and SYM_NB.

Referenced by ppm_expander::getch().

void ppm_worker::PPM_End void   ) 
 

Definition at line 435 of file ppm.cpp.

References hash_table, and node_heap.

Referenced by ppm_expander::locate(), and ppm_expander::~ppm_expander().

int ppm_worker::PPM_Init unsigned  short  ) 
 

Definition at line 396 of file ppm.cpp.

References ctx_first, ctx_last, ctx_nb, _NODE::free_next, HASH_ADDRESS, HASH_SIZE, hash_table, i, NIL, node_free_first, node_free_last, node_free_nb, node_heap, NULL, ORDER_MAX, sym_context, sym_excl_code, and sym_hash.

Referenced by ppm_expander::locate().

void ppm_worker::Sym_ExcludeReset void   )  [private]
 

Definition at line 377 of file ppm.cpp.

References i, sym_excl, sym_excl_code, and SYM_NB.

Referenced by PPM_Decode().


Member Data Documentation

ArithClass ppm_worker::arith
 

Definition at line 172 of file ppm.h.

Referenced by Decode_NewSym(), Decode_NoExclude(), ppm_expander::locate(), and ppm_expander::~ppm_expander().

UINT ppm_worker::ctx_first [private]
 

Definition at line 122 of file ppm.h.

Referenced by Context_MoveFirst(), Context_New(), and PPM_Init().

UINT ppm_worker::ctx_last [private]
 

Definition at line 123 of file ppm.h.

Referenced by Context_DeleteLast(), Context_MoveFirst(), PPM_Decode(), and PPM_Init().

UINT ppm_worker::ctx_nb [private]
 

Definition at line 124 of file ppm.h.

Referenced by Context_DeleteLast(), Context_New(), and PPM_Init().

USHORT* ppm_worker::hash_table [private]
 

Definition at line 121 of file ppm.h.

Referenced by Context_DeleteLast(), Context_New(), Context_Search(), PPM_End(), and PPM_Init().

UINT ppm_worker::node_free_first [private]
 

Definition at line 117 of file ppm.h.

Referenced by Node_Alloc(), and PPM_Init().

UINT ppm_worker::node_free_last [private]
 

Definition at line 118 of file ppm.h.

Referenced by Node_Free(), and PPM_Init().

UINT ppm_worker::node_free_nb [private]
 

Definition at line 116 of file ppm.h.

Referenced by Node_Alloc(), Node_Free(), and PPM_Init().

NODE* ppm_worker::node_heap [private]
 

Definition at line 115 of file ppm.h.

Referenced by Context_DeleteLast(), Context_MoveFirst(), Context_New(), Context_NewSym(), Context_Renorm(), Context_Search(), Decode_Exclude(), Decode_NoExclude(), Node_Alloc(), Node_Free(), PPM_End(), and PPM_Init().

UCHAR ppm_worker::sym_context[ORDER_MAX+1] [private]
 

Definition at line 127 of file ppm.h.

Referenced by Context_New(), Context_Search(), Hash_Update(), and PPM_Init().

UCHAR ppm_worker::sym_excl[SYM_NB] [private]
 

Definition at line 135 of file ppm.h.

Referenced by Decode_Exclude(), Decode_NewSym(), Decode_NoExclude(), and Sym_ExcludeReset().

UCHAR ppm_worker::sym_excl_code [private]
 

Definition at line 136 of file ppm.h.

Referenced by Decode_Exclude(), Decode_NewSym(), Decode_NoExclude(), PPM_Init(), and Sym_ExcludeReset().

int ppm_worker::sym_hash[ORDER_MAX+1] [private]
 

Definition at line 129 of file ppm.h.

Referenced by Context_New(), Context_Search(), Hash_Update(), and PPM_Init().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:45:22 2005 for OPIE by  doxygen 1.4.2