Go to the source code of this file.

#define  HUFFHEAP_SIZE ((sizeof(double) * 257) + (((sizeof(void *) * 4) + sizeof(double) + sizeof(unsigned long)) * (257 * 3)) + ((sizeof(unsigned long) + sizeof(unsigned long)) * 257)) 


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) 

#define HUFFHEAP_SIZE ((sizeof(double) * 257) + (((sizeof(void *) * 4) + sizeof(double) + sizeof(unsigned long)) * (257 * 3)) + ((sizeof(unsigned long) + sizeof(unsigned long)) * 257)) 
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
 Parameters

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) 
 Returns
 Size of encoded result or 0 on out buffer overrun
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
 Parameters

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) 
 Returns
 Size of decoded result or 0 on out buffer overrun or corrupt input data