Context algorithm
Semi-predictive context algorithm implementation
 All Data Structures Files Functions Variables Typedefs Macros Pages
see.c File Reference
#include <assert.h>
#include <math.h>
#include "see.h"
#include "debug.h"

Go to the source code of this file.

Functions

static int get3ByteRepresentation (const Uint num, const Uint alphasize)
 
int getSeeStateEncoder (fsmTree_t tree, Uint allCount, Uint pos, Uint numMasked, const Uchar *text, Uint alphasize)
 Returns the contents of the SEE table for the encoder. More...
 
int getSeeStateDecoder (decoderTree_t tree, Uint allCount, Uint pos, Uint numMasked, const Uchar *text, Uint alphasize)
 Returns the contents of the SEE table for the encoder. More...
 
void updateSee (Uint state, BOOL escape, Uint alphasize)
 Updates the SEE table. More...
 
void initSee ()
 Initalizes the SEE table. More...
 

Function Documentation

static int get3ByteRepresentation ( const Uint  num,
const Uint  alphasize 
)
static

Definition at line 24 of file see.c.

int getSeeStateDecoder ( decoderTree_t  tree,
Uint  allCount,
Uint  pos,
Uint  numMasked,
const Uchar text,
Uint  alphasize 
)

Returns the contents of the SEE table for the encoder.

Definition at line 82 of file see.c.

int getSeeStateEncoder ( fsmTree_t  tree,
Uint  allCount,
Uint  pos,
Uint  numMasked,
const Uchar text,
Uint  alphasize 
)

Returns the contents of the SEE table for the encoder.

Parameters
[in]treecurrent node of the tree
[in]allCounttotal number of symbols observed in this state
[in]posposition of the current character in the input text
[in]numMaskednumber of masked characters in the current state
[in]textinput text
[in]alphasizetext alphabet size
Returns

Definition at line 44 of file see.c.

void initSee ( )

Initalizes the SEE table.

Definition at line 139 of file see.c.

void updateSee ( Uint  state,
BOOL  escape,
Uint  alphasize 
)

Updates the SEE table.

Definition at line 120 of file see.c.