#include "huffman.h"
Classes | |
struct | _huffman_node |
struct | _huffman_encode_table |
Functions | |
static void | _huffman_write_tree_and_make_encode_table (unsigned char *out, unsigned long *outbitctr, unsigned long outlen, struct _huffman_encode_table *et, unsigned long code, unsigned int bits, struct _huffman_node *t) |
static struct _huffman_node * | _huffman_read_tree (const unsigned char *in, unsigned long *inbitctr, unsigned long inlen, unsigned char **heapptr, unsigned char *heapend) |
unsigned long | huffman_compress (const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long outlen, void *huffheap) |
unsigned long | huffman_decompress (const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long outlen, void *huffheap) |
|
staticread |
|
static |
unsigned long huffman_compress | ( | const unsigned char * | in, |
unsigned long | inlen, | ||
unsigned char * | out, | ||
unsigned long | outlen, | ||
void * | huffheap | ||
) |
Huffman encode a block of data
in | Input data |
inlen | Input data length |
out | Output buffer |
outlen | Output buffer length |
huffheap | Heap memory to use for compression (must be HUFFHEAP_SIZE in size) |
unsigned long huffman_decompress | ( | const unsigned char * | in, |
unsigned long | inlen, | ||
unsigned char * | out, | ||
unsigned long | outlen, | ||
void * | huffheap | ||
) |
Huffman decode a block of data
in | Input data |
inlen | Length of input data |
out | Output buffer |
outlen | Length of output buffer |
huffheap | Heap memory to use for decompression (must be HUFFHEAP_SIZE in size) |