登录
首页 » Visual C++ » HuffanCoding

HuffanCoding

于 2020-07-02 发布 文件大小:8080KB
0 118
下载积分: 1 下载次数: 3

代码说明:

  读取数据,统计所得到的文件中每个字母的权值,创建哈夫曼树,哈夫曼编码。哈夫曼解码,解码后内容写入到指定的文件。 读取数据里面的内容是由英文单词组成。读取文件的时候传入文件存放的路径、读取方式以及读出以后存放的数组,最终可以得到一个存放目标文件内容的数组。 将得到的数组进行字母权值的统计,统计每个字母出现的次数,次数即为每个字母的权值。 将得到的字符数组与权值数组作为创建哈夫曼树的依据,哈夫曼树根据每个字母权值的大小来创建,每个节点,包括权值、父节点、左子、右子和字母本身。 根据哈夫曼树进行编码。形成目标文件的哈夫曼编码,将此编码返回。 根据哈夫曼树得到的数组即为解码数组,解码数组作为解码的结果返回。 写入输出文件,将解码得到的数组、文件的完整路径以及文件的写方式作为参数传入,将数组写入到相应的文件中。 (Read the data, statistical documents obtained weights for each letter, create a Huffman tree, Huffman coding. Huffman decoding, the decoded contents are written to the specified file. Read the content inside is composed of English words. When the incoming file to read the file storage path, read mode and read out after storage array that can eventually get a storage target file contents of the array. The resulting array of letter weights statistics, statistical number of occurrences of each letter, the number is the weight of each letter. The resulting character array with the weights array as the basis for creating Huffman tree, Huffman tree based on the size of the weights of each letter to create, for each node, including weights, parent, left child, right child, and letter itself. According to Huffman coding. The formation of the target file Huffman coding, this code returns. According to Huffman decoding the resulting array is an array, the decoder decodes the result is retur)

文件列表:

软件技术课程设计
................\HuffanCoding
................\............\Debug
................\............\.....\HuffanCoding.bsc,1926144,2013-06-16
................\............\.....\HuffanCoding.ilk,219888,2013-06-16
................\............\.....\HuffanCoding.obj,24998,2013-06-16
................\............\.....\HuffanCoding.pch,4577196,2013-06-16
................\............\.....\HuffanCoding.pdb,525312,2013-06-16
................\............\.....\HuffanCoding.sbr,0,2013-06-16
................\............\.....\input.txt,0,2013-06-16
................\............\.....\vc60.idb,148480,2013-06-16
................\............\.....\vc60.pdb,77824,2013-06-16
................\............\HuffanCoding.cpp,5540,2013-06-16
................\............\HuffanCoding.dsp,4421,2013-06-15
................\............\HuffanCoding.dsw,549,2013-06-14
................\............\HuffanCoding.h,893,2013-06-15
................\............\HuffanCoding.ncb,50176,2013-06-16
................\............\HuffanCoding.opt,48640,2013-06-16
................\............\HuffanCoding.plg,1079,2013-06-16
................\............\input.txt,0,2013-06-16
................\............\output.txt,271,2013-06-15
................\............\Readme.txt,377,2013-06-15
................\参考代码
................\........\哈夫曼编码
................\........\..........\Huffan
................\........\..........\......\Debug
................\........\..........\......\.....\Huffan.exe,200781,2013-06-15
................\........\..........\......\.....\Huffan.ilk,208192,2013-06-15
................\........\..........\......\.....\Huffan.obj,13101,2013-06-15
................\........\..........\......\.....\Huffan.pch,227520,2013-06-15
................\........\..........\......\.....\Huffan.pdb,492544,2013-06-15
................\........\..........\......\.....\vc60.idb,33792,2013-06-15
................\........\..........\......\.....\vc60.pdb,53248,2013-06-15
................\........\..........\......\Huffan.c,7021,2013-06-15
................\........\..........\......\Huffan.dsp,4282,2013-06-15
................\........\..........\......\Huffan.dsw,537,2013-06-15
................\........\..........\......\Huffan.ncb,33792,2013-06-15
................\........\..........\......\Huffan.opt,48640,2013-06-15
................\........\..........\......\Huffan.plg,1300,2013-06-15
................\........\赫夫曼编码与译码
................\........\................\HuffanCoding
................\........\................\............\Debug
................\........\................\............\.....\HuffanCoding.bsc,1926144,2013-06-15
................\........\................\............\.....\HuffanCoding.exe,196703,2013-06-15
................\........\................\............\.....\HuffanCoding.ilk,216692,2013-06-15
................\........\................\............\.....\HuffanCoding.obj,24709,2013-06-15
................\........\................\............\.....\HuffanCoding.pch,4577196,2013-06-15
................\........\................\............\.....\HuffanCoding.pdb,525312,2013-06-15
................\........\................\............\.....\HuffanCoding.sbr,0,2013-06-15
................\........\................\............\.....\input.txt,0,2013-06-15
................\........\................\............\.....\vc60.idb,148480,2013-06-15
................\........\................\............\.....\vc60.pdb,77824,2013-06-15
................\........\................\............\HuffanCoding.cpp,5523,2013-06-15
................\........\................\............\HuffanCoding.dsp,4421,2013-06-15
................\........\................\............\HuffanCoding.dsw,549,2013-06-14
................\........\................\............\HuffanCoding.h,893,2013-06-15
................\........\................\............\HuffanCoding.ncb,50176,2013-06-15
................\........\................\............\HuffanCoding.opt,48640,2013-06-15
................\........\................\............\HuffanCoding.plg,1528,2013-06-15
................\........\................\............\input.txt,53,2013-06-15
................\........\................\............\output.txt,271,2013-06-15
................\........\................\............\Readme.txt,377,2013-06-15
................\参考文档
................\........\哈夫曼编码和译码的设计与实现.doc,125440,2013-06-15
................\........\哈夫曼编码算法的实现用C 编写.doc,46592,2013-06-15
................\........\哈夫曼编码解码报告.doc,128000,2013-06-15
................\........\数据结构实验—哈夫曼树编码.doc,168960,2013-06-15
................\软件技术基础课程设计
................\....................\参考题目.txt,200,2013-06-03
................\....................\数据结构与算法_最小生成树.ppt,1303552,2013-05-03
................\....................\第一章 绪论.ppt,1315328,2013-02-24
................\....................\第七章 图(1).ppt,407552,2013-04-23
................\....................\第七章 图(2).ppt,803328,2013-04-26
................\....................\第七章 图(3).ppt,645120,2013-04-20
................\....................\第八章 查找(2).ppt,222720,2013-05-26
................\....................\第八章 查找(3).ppt,364544,2013-06-02
................\....................\第六章 树和二叉树(1).ppt,515584,2013-03-27
................\....................\第六章 树和二叉树(2).ppt,1051136,2013-04-01
................\....................\第六章 树和二叉树(3).ppt,657920,2013-04-11
................\....................\第六章 树和二叉树(4).ppt,288768,2013-04-15
................\....................\软件技术课程设计小论文.doc,176128,2013-06-15
................\....................\齐 第七章 图(5).ppt,378880,2013-05-23
................\....................\齐 第八章 查找(1).ppt,273920,2013-05-23
................\软件技术课程设计__周旭阳doc.doc,176128,2013-06-16
................\软件技术课程设计__周旭阳doc.pdf,224700,2013-06-16

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • MyKD Tree
    KD树算法,能够实现对点云数据进行压缩,非常简单,适用于初学者(KD tree algorithm, can achieve the point cloud data compression, very simple, suitable for beginners)
    2015-06-24 20:10:33下载
    积分:1
  • PX
    说明:  一个用VS2008编写的冒泡排序算法演示程序,数组都是随机生成的。(Bubble Sort)
    2014-06-18 20:06:13下载
    积分:1
  • hanoi
    Hanoi塔问题非递归算法实现,几个具体的实现算法(Tower of Hanoi non-recursive algorithm, the realization of a number of specific algorithms)
    2009-07-13 08:45:51下载
    积分:1
  • 03
    说明:  《妙趣横生的算法》第三部分原书附带代码程序,绝对属实(&quot Algorithm for fun,&quot the third part of the original program with the code, the absolute truth)
    2011-04-24 01:36:18下载
    积分:1
  • suanfa
    插入排序与合并排序的算法比较,比较两种算法的优劣(Comparison of insertion sort and merge)
    2011-12-13 22:28:33下载
    积分:1
  • tree
    使用非递归的方法遍历二叉树,可以直接运行。( Non-recursive binary tree traversal.)
    2013-12-04 16:08:43下载
    积分:1
  • Cpp2
    c-w算法,讲述一种分配运输的节约方法,适合于车辆的调度(c-w algorithm,About one distribution transport saving method, suitable for vehicle scheduling)
    2011-12-07 15:02:14下载
    积分:1
  • nuaa1108
    说明:  nuaa1108 多少连续的1 解题报告(Problem solving report )
    2009-08-23 10:01:05下载
    积分:1
  • 0728-0708-0704
    北邮数据结构课程设计大作业之旅行模拟查询系统。可实现多线程多旅客、中途更改计划、动态显示旅客状态等多个需求。已通过验收。(BUPT curriculum design travel query system simulation of large operations. Multithreading enables passengers to change plans midway, dynamic display multiple demands guest status. It has passed inspection.)
    2021-03-14 12:09:23下载
    积分:1
  • mofanwenti
    魔方问题 数据结构 使用c++ 经典问题(Cube problem Data Structure Using c++ Classic problem)
    2014-01-08 22:30:48下载
    积分:1
  • 696518资源总数
  • 104349会员总数
  • 32今日下载