Context algorithm
Semi-predictive context algorithm implementation
|
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include "encoder.h"
#include "alpha.h"
#include "debug.h"
#include "text.h"
#include "spacedef.h"
#include "arithmetic/coder.h"
#include "arithmetic/bitio.h"
#include "see.h"
#include "reset.h"
Go to the source code of this file.
Functions | |
static void | fixParents (fsmTree_t tree, BOOL *deletedChars) |
Remove symbols from the statistics of the ancestors of this node in case that is necessary. More... | |
static void | rescale (fsmTree_t tree) |
void | encode (fsmTree_t tree, FILE *compressedFile, const Uchar *text, const Uint textlen, const BOOL useSee) |
Encode the input data into the output file using the tree as model. More... | |
Remove symbols from the statistics of the ancestors of this node in case that is necessary.
Symbols are removed from the ancestors if they only have the same symbols as the child node (including the ones indicated in deletedChars).
[in] | tree | node of the tree. |
[in] | deletedChars | bit vector indicating which characters have been erased from the node statistics. |