GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-4-0

Constituent: test_huff     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

HUFF.h File Reference

Huffman Encode/Decode, interface file. More...

#include "PBI/Endianness.h"

Include dependency graph for HUFF.h:

This graph shows which files directly or indirectly include this file:


Classes

struct  _HUFF_code
 Structure to contain the Huffman code, both the bit pattern and its length. More...
struct  _HUFF_symbol_bf
 The information associate with a decoded symbol. More...
union  _HUFF_symbol

Defines

#define HUFF_N_WA(_cnt)   (HUFF_N_HEAP(_cnt) + HUFF_N_PARENTS(_cnt))
 Gives the number of elements needed by the temporary wa array based of the number of elements in the frequency table.

Typedefs

typedef struct
_HUFF_dtable 
HUFF_dtable
typedef struct _HUFF_code HUFF_code
 Typedef for struct _HUFF_code.
typedef struct
_HUFF_symbol_bf 
HUFF_symbol_bf
typedef union
_HUFF_symbol 
HUFF_symbol

Functions

int HUFF_build (HUFF_code *codes, const unsigned int *freqs, int count, unsigned int *wa)
int HUFF_buildDense (HUFF_code *codes, const unsigned int *freq, const unsigned int *valid, int nvalid, unsigned int *wa)
int HUFF_buildSparse (HUFF_code *codes, const unsigned int *freq, const unsigned int *valid, int nvalid, unsigned int *wa)
int HUFF_bcompress (void *out, unsigned int boff, void *max, const HUFF_code *codes, const unsigned char *in, int cnt, int *unencoded)
int HUFF_size (const HUFF_code *codes, const unsigned int *freqs, int count)
int HUFF_sizeDense (const HUFF_code *codes, const unsigned int *freq, const unsigned int *valid, int nvalid)
int HUFF_sizeSparse (const HUFF_code *codes, const unsigned int *freq, const unsigned int *valid, int nvalid)
int HUFF_dtableSizeof (int nsymbols)
void HUFF_dtableBuild (HUFF_dtable *dtable, const unsigned char *sym_lens, int nsymbols)
void HUFF_dtableBiase (HUFF_dtable *dtable, int biase)
void HUFF_dtablePrint (const HUFF_dtable *dtable)
unsigned int HUFF_decode (const HUFF_dtable *dtable, const unsigned int *src, unsigned int boff)
int HUFF_decompressBytes (unsigned char *dst, int cnt, const void *src, unsigned int boff, const HUFF_dtable *dtable)
int HUFF_decompressShorts (unsigned short int *dst, int cnt, const void *src, unsigned int boff, const HUFF_dtable *dtable)
int HUFF_decompressLongs (unsigned int *dst, int cnt, const void *src, unsigned int boff, const HUFF_dtable *dtable)
void HUFF_codesPrint (const HUFF_code *codes, int ncodes)

Detailed Description

Huffman Encode/Decode, interface file.

Author:
JJRussell - russell@slac.stanford.edu

CVS $Id

Warning:
In their current state, these routines are not fit for Flight use. They can be used to determine compression factors and, in general, study the properties of Huffman encoding/decoding. However, they malloc all over the place and involve recursive calling techniques, neither of is appropriate for Flight code.

Define Documentation

#define HUFF_N_WA ( _cnt   )     (HUFF_N_HEAP(_cnt) + HUFF_N_PARENTS(_cnt))

Gives the number of elements needed by the temporary wa array based of the number of elements in the frequency table.

Returns:
The number of elements needed by the temporary wa array
Parameters:
_cnt The number of elements in the frequency table.


Generated on Fri Jun 19 01:49:03 2009 by  doxygen 1.5.3