AlcapDAQ
1
|
Go to the source code of this file.
Data Structures | |
struct | huffman_node |
Typedefs | |
typedef struct huffman_node | huffman_node |
Functions | |
void | huffman_put_symbol (huffman_table *table, io_buffer *buffer, int symbol) |
int | huffman_get_symbol (huffman_table *table, io_buffer *buffer) |
void | huffman_precompute_decode (huffman_table *table) |
int | huffman_node_compare (const void *p1, const void *p2) |
void | huffman_visit (huffman_table *table, huffman_node *node, int length, unsigned int bits) |
BOOL | huffman_optimize_tree (huffman_table *table) |
void | huffman_init_default (huffman_table *table, int num_symbols) |
BOOL | save_huffman (char *key_dir, huffman_table *table) |
void | init_huffman_node (huffman_node *node) |
void | huffman_delete_tree (huffman_node *node) |
BOOL | huffman_build_tree (huffman_table *table) |
BOOL | load_huffman (char *key_dir, huffman_table *table) |
typedef struct huffman_node huffman_node |
BOOL huffman_build_tree | ( | huffman_table * | table) |
Definition at line 376 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_table::code_bits, huffman_table::code_length, huffman_node::frequency, huffman_table::frequency, huffman_precompute_decode(), i, init_huffman_node(), huffman_table::num_symbols, SUCCESS, huffman_node::symbol, and huffman_table::tree.
Referenced by load_huffman().
void huffman_delete_tree | ( | huffman_node * | node) |
Definition at line 363 of file huffman.cpp.
References huffman_node::branch0, and huffman_node::branch1.
int huffman_get_symbol | ( | huffman_table * | table, |
io_buffer * | buffer | ||
) |
Definition at line 87 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_table::code_length, huffman_table::decode_symbols, io_buffer::num_codes, io_buffer::p, huffman_node::symbol, huffman_table::tree, io_buffer::w, and io_buffer::w_bits.
Referenced by decode_caen(), decode_cmp_times(), decode_fadc(), decode_hits(), decode_times(), and rle_get().
void huffman_init_default | ( | huffman_table * | table, |
int | num_symbols | ||
) |
Definition at line 305 of file huffman.cpp.
References huffman_table::code_bits, huffman_table::code_length, huffman_table::frequency, huffman_optimize_tree(), i, huffman_table::num_symbols, and huffman_table::tree.
Referenced by caen_load(), comp_load(), fadc_load(), hits_load(), stck_load(), and tdc400_load().
int huffman_node_compare | ( | const void * | p1, |
const void * | p2 | ||
) |
Definition at line 176 of file huffman.cpp.
References huffman_node::frequency.
Referenced by huffman_optimize_tree().
BOOL huffman_optimize_tree | ( | huffman_table * | table) |
Definition at line 200 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_table::code_length, huffman_table::frequency, huffman_node::frequency, huffman_node_compare(), huffman_precompute_decode(), huffman_visit(), i, huffman_node::next, huffman_table::num_symbols, SUCCESS, huffman_node::symbol, and huffman_table::tree.
Referenced by caen_optimize(), comp_optimize(), fadc_optimize(), hits_optimize(), huffman_init_default(), stck_optimize(), and tdc400_optimize().
void huffman_precompute_decode | ( | huffman_table * | table) |
Definition at line 137 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_table::decode_symbols, i, huffman_node::symbol, and huffman_table::tree.
Referenced by huffman_build_tree(), and huffman_optimize_tree().
void huffman_put_symbol | ( | huffman_table * | table, |
io_buffer * | buffer, | ||
int | symbol | ||
) |
Definition at line 28 of file huffman.cpp.
References huffman_table::code_bits, huffman_table::code_length, huffman_table::frequency, io_buffer_put(), io_buffer::num_codes, and huffman_node::symbol.
Referenced by encode_caen(), encode_cmp_times(), encode_fadc(), encode_hits(), encode_times(), flush_rle(), and rle_put().
void huffman_visit | ( | huffman_table * | table, |
huffman_node * | node, | ||
int | length, | ||
unsigned int | bits | ||
) |
Definition at line 185 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_table::code_bits, huffman_table::code_length, length, and huffman_node::symbol.
Referenced by huffman_optimize_tree().
void init_huffman_node | ( | huffman_node * | node) |
Definition at line 354 of file huffman.cpp.
References huffman_node::branch0, huffman_node::branch1, huffman_node::frequency, huffman_node::next, and huffman_node::symbol.
Referenced by huffman_build_tree().
BOOL load_huffman | ( | char * | key_dir, |
huffman_table * | table | ||
) |
Definition at line 429 of file huffman.cpp.
References huffman_table::code_bits, huffman_table::code_length, FALSE, huffman_table::frequency, hDB, huffman_build_tree(), i, huffman_table::num_symbols, size, sprintf(), and SUCCESS.
Referenced by caen_load(), comp_load(), fadc_load(), hits_load(), stck_load(), and tdc400_load().
BOOL save_huffman | ( | char * | key_dir, |
huffman_table * | table | ||
) |
Definition at line 321 of file huffman.cpp.
References huffman_table::code_bits, huffman_table::code_length, huffman_table::frequency, hDB, huffman_table::num_symbols, size, sprintf(), and SUCCESS.
Referenced by caen_optimize(), comp_optimize(), fadc_optimize(), hits_optimize(), stck_optimize(), and tdc400_optimize().