基于哈夫曼编码实现文本文件的压缩和解压缩.docVIP

  • 40
  • 1
  • 约8.37千字
  • 约 11页
  • 2020-08-27 发布于浙江
  • 举报

基于哈夫曼编码实现文本文件的压缩和解压缩.doc

#include iostream #include sys/stat.h #ifndef _UNISTD_H #define _UNISTD_H #include io.h #include process.h #endif /* _UNISTD_H */ #include stdio.h #includestdlib.h #include windows.h #include fstream #include vector #include algorithm #include cstring using namespace std; typedef struct { int weight; int parent,lchild,rchild; }HTNode,*HuffmanTree; typedef struct { char* data; int* num; int length; }TNode; typedef struct { char *data; char** HM; }Code; typedef char** HuffmanCode; bool IfEncode() { int choose; system(color 70); cout\t 1.加密压缩 2.无密压缩endl; cout请输入选择:

文档评论(0)

1亿VIP精品文档

相关文档