Listing 1 hufftree.h: defines Huffman encoding tree structure

struct htree
{ short parent;
  short right;
  short left;
};

#ifdef MAIN
struct htree ht[512];
short root;
#else
extern struct htree ht[];
extern short root;
#endif

void compress(int inlen, char *bufin, int *outlen, char
*bufout);
void encode(short h, short child, int *outlen, char *bufout);
void emit(int bit, int *outlen, char *bufout);
void decode(char *bufin, int *outlen, char *bufout);

/* End of File */