Haffman Code
Thursday, 14. December 2006, 13:28:21
This is a program for my friend, it workds as follows:
Coding Part
1. Read "a.dat"
2. Build the Haffman Tree
3. Store the Haffman Coding, and store the Haffman Code in "code.dat"
4. Translate the source file to "01" string via the "Haffman Code", and store them in "b.dat"
5. Translate the "01" string to ASCII Code, and store them in "ASC.dat"
-----------------------
DeCoding Part
6. Load the HaffmanCode
7. Translate the ASCII Code into "01" string, and store them in "d.dat"
8. Translate the "01" string into the file, and store them in "e.dat"
Thus "e.dat" will be the same as "a.dat"
Final.rar
Coding Part
1. Read "a.dat"
2. Build the Haffman Tree
3. Store the Haffman Coding, and store the Haffman Code in "code.dat"
4. Translate the source file to "01" string via the "Haffman Code", and store them in "b.dat"
5. Translate the "01" string to ASCII Code, and store them in "ASC.dat"
-----------------------
DeCoding Part
6. Load the HaffmanCode
7. Translate the ASCII Code into "01" string, and store them in "d.dat"
8. Translate the "01" string into the file, and store them in "e.dat"
Thus "e.dat" will be the same as "a.dat"
Final.rar







