哈弗曼编码解码器(_课程设计).docVIP

  • 13
  • 0
  • 约1.45万字
  • 约 29页
  • 2016-09-29 发布于安徽
  • 举报
//课程设计:哈弗曼编码解码器及报告书 //vc6测试可以 //运行的条件是:“yasuo.txt”, “yima.txt”, “jieya.txt”存在,要压缩的信息已存//在了其他一个文本文档中,然后根据提示输入要压缩的文本文件名,输入的文件名要 //加.txt扩展名,如:a.txt。 //write by dlnu.ZJY #include iostream #include fstream #define Max 50 #define MAX 10000 using namespace std; struct tree//存储统计的频率和字母的 { char word; int rare; }; struct Bianma//存各字母所对应的编码的 { char word; int code[Max]; }; struct element//哈弗曼树的 { tree weight; int lchild; int rchild; int parent; int flag; int yezi; }; //__________________________________全局变量 element huffTree[103]; Bianma bianma[52]; int zijie, wei, yushu; char filename[50]; //___

文档评论(0)

1亿VIP精品文档

相关文档