Huffman CoDe PrObl?m-> need a function plz :) 
Author Message
 Huffman CoDe PrObl?m-> need a function plz :)

hey ppl .....  hope ya can help with this 1  plzzz :>

Im writing a program which performs Huffman Coding both encoding &
decoding a character message.  Im using a Linked-List Not arrays!
Basically i have built a linked list with pointers to "leaf" nodes.  I read
in characters and frequency data from a file, and then use a inorder
traversal routine to display the characeters and frequency data stored in
each node.
Now..  what the problem is i need to Create 3 more functions which
1). Recursive Function which generates Huffman code:
void GenerateCodes(TREENODEPTR, FREQTABLE, int, BITS);
2&3). Functions which both Encode/Decode a message file:
void Encode(FREQTABLE freqtable, BUFFTYPE buffer, char ch, int *len);
void Decode(FREQTABLE freqtable, BUFFTYPE buffer, int len, TREENODEPTR

If anyone out there has done something similar to this and has existing
functions, i would really appreciate the help..  thnx


btw usin  prototypes:
#define BUFFMAX 32
typedef struct listnode {
    int frq;
    TREENODEPTR subtree;
    struct listnode *next;
typedef int BITS[NUMCHARS]; /*use ints 1 & 0 */
typedef struct info{
    int size;
    BITS code;
    } INFO;
typedef int BUFFTYPE[BUFFMAX];


Mon, 05 Nov 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Huffman coding/huffman tree

2. Need Help! Huffman Code

3. <<<>>>Need C code advice with functions and sorting.<<<>>>

4. Huffman Coding Source Code in C

5. dynamic huffman coding (source code) ????

6. Huffman Coding

7. Huffman Coding

8. Dynamic huffman source code ?????

9. huffman tree source code

10. huffman tree/coding

11. Hamming and Huffman codes



Powered by phpBB® Forum Software