Context algorithm
Semi-predictive context algorithm implementation
 All Data Structures Files Functions Variables Typedefs Macros Pages
see.h
Go to the documentation of this file.
1 /* Copyright 2013 Jorge Merlino
2 
3  This file is part of Context.
4 
5  Context is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Context is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with Context. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef SEE_H
20 #define SEE_H
21 
22 #include "types.h"
23 #include "fsmTree.h"
24 #include "decoderTree.h"
25 
27 Uint See[1<<14][2];
28 
30 int getSeeStateEncoder (fsmTree_t tree, Uint allCount, Uint pos, Uint numMasked, const Uchar * text, Uint alphasize);
31 
33 int getSeeStateDecoder (decoderTree_t tree, Uint allCount, Uint pos, Uint numMasked, const Uchar * text, Uint alphasize);
34 
36 void updateSee (Uint state, BOOL escape, Uint alphasize);
37 
39 void initSee ();
40 
41 #endif
Uint alphasize
Alphabet size.
Definition: alpha.h:25
unsigned char Uchar
Unsigned char type.
Definition: types.h:48
Uchar * text
Input text to the encoder.
Definition: text.h:26
unsigned long Uint
Unsigned int type.
Definition: types.h:54
#define BOOL
Boolean data type.
Definition: types.h:92
Encoder context tree structure.
Definition: fsmTree.h:28
static short pos
Current position in the buffer.
Definition: fsmTree.c:35
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.
Definition: see.c:44
Uint See[1<< 14][2]
SEE table structure.
Definition: see.h:27
void initSee()
Initalizes the SEE table.
Definition: see.c:139
void updateSee(Uint state, BOOL escape, Uint alphasize)
Updates the SEE table.
Definition: see.c:120
Decoder context tree structure.
Definition: decoderTree.h:25
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: see.c:82