哈弗曼编码

时间:2015-12-26 05:06:22
【文件属性】:
文件名称:哈弗曼编码
文件大小:8.6MB
文件格式:RAR
更新时间:2015-12-26 05:06:22
哈弗曼 哈弗曼 压缩 解压 对话框资源 Huffman::Huffman() { for(int i = 0;i<256;i++) //初始化哈弗曼树 { T[i].value = i; T[i].weight = 0; T[i].lchild = 0; T[i].rchild = 0; T[i].parent = 0; } } Huffman::~Huffman() { delete []heap; delete []z; } void Huffman::GetWeight(CString name) { ifstream file; file.open(name,ios::in|ios::binary); char ch; while(file.get(ch)) //每次取8位字节 { T[(int)ch+128].weight++; //将-127~+127 转换成 0~255 统计权值 } }
【文件预览】:
哈弗曼
----哈弗曼.ncb(18.38MB)
----哈弗曼()
--------Huffman.h(1KB)
--------stdafx.cpp(137B)
--------res()
--------stdafx.h(2KB)
--------LinkedQueue.h(1KB)
--------哈弗曼.rc(5KB)
--------哈弗曼.cpp(2KB)
--------Encolding.txt(71KB)
--------example.txt(74KB)
--------Encolding.haf(59KB)
--------Huffman.cpp(10KB)
--------哈弗曼.aps(57KB)
--------resource.h(954B)
--------哈弗曼.vcproj.lenovo-THINK.lenovo.user(1KB)
--------哈弗曼.vcproj(6KB)
--------哈弗曼Dlg.cpp(5KB)
--------哈弗曼.h(441B)
--------哈弗曼Dlg.h(966B)
--------Debug()
--------ReadMe.txt(3KB)
----哈弗曼.suo(25KB)
----哈弗曼.sln(892B)

网友评论