path-packer-c/huffman.h
James Bowes 8d59720195 Add 'r' raw command to unpack.
r dumps the raw format as seen in the file to stdout as readable text.
2012-09-06 11:13:22 -03:00

13 lines
307 B
C

#include <stdbool.h>
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, bool print);