lib/include/arith-code.h File Reference

Symbol coding. More...

Go to the source code of this file.

Data Structures

struct  arith_code_symbol_t
 A symbol can be an int or a pair of counts on a scale. Here is the structure for the latter. More...

Defines

#define ARITH_CODE_MAXIMUM_SCALE   16383
 Max allowed frequency count.
#define ARITH_CODE_ESCAPE   256
 Escape symbol.
#define ARITH_CODE_DONE   -1
 Output stream empty symbol.
#define ARITH_CODE_FLUSH   -2
 Symbol to flush the model.

Functions

void arith_code_encode (char *in_buf, uint8_t in_len, char *out_buf, uint8_t out_len)
 Encode a symbol.
void arith_code_decode (char *in_buf, uint8_t in_len, char *out_buf, uint8_t out_len)
 Decode a symbol.


Detailed Description

largely based on: http://dogma.net/markn/articles/arith/

Definition in file arith-code.h.


Function Documentation

void arith_code_decode char *  in_buf,
uint8_t  in_len,
char *  out_buf,
uint8_t  out_len
 

Parameters:
in_buf Input buffer
in_len Input length
out_buf Output buffer
out_len Output length

void arith_code_encode char *  in_buf,
uint8_t  in_len,
char *  out_buf,
uint8_t  out_len
 

Parameters:
in_buf Input buffer
in_len Input length
out_buf Output buffer
out_len Output length


Generated on Mon Nov 23 06:25:59 2009 for MANTIS by  doxygen 1.4.6