Add huffman decoding for C
This commit is contained in:
parent
4b82b83e02
commit
11fd9f1f4a
6 changed files with 193 additions and 30 deletions
12
huffman.h
Normal file
12
huffman.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
struct huffman_node {
|
||||
int weight;
|
||||
void *value;
|
||||
struct huffman_node *left;
|
||||
struct huffman_node *right;
|
||||
};
|
||||
|
||||
struct huffman_node *huffman_build_tree(void **values, int count);
|
||||
|
||||
void *huffman_lookup (struct huffman_node *tree, unsigned char *bits,
|
||||
int *bits_read);
|
Loading…
Add table
Add a link
Reference in a new issue