登录
首页 » Visual C++ » HuffanCoding

HuffanCoding

于 2020-07-02 发布 文件大小:8080KB
0 178
下载积分: 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 个回复

  • chessboard-distance
    一道poj上的问题的解答,棋盘上的距离问题。即实现棋盘上从一个点移动到王,后,兵之间最短步数的解答。(A poj answers to your questions on the chessboard distance problem. That is, move from one point to the king on the board, after the shortest number of steps between the soldiers answer.)
    2012-06-20 10:10:45下载
    积分:1
  • Insert
    POJ 字符串的插入 可以将一定长度的字符串插入之前给出的字符串之中(POJ string can be inserted into a length of string into a string before being given)
    2013-11-21 23:27:17下载
    积分:1
  • Huffman
    说明:  数据结构:Huffman编码。哈夫曼编码是哈夫曼树的一个应用。哈夫曼编码应用广泛,如JPEG中就应用了哈夫曼编码。 哈夫曼树又称最优二叉树,是一种带权路径长度最短的二叉树。(Data structure: Huffman coding. Huffman coding is an application of the Huffman tree. Huffman coding is widely used, such as JPEG in the application of the Huffman coding. Huffman tree, also known as the best binary tree is a weighted shortest path length binary tree.)
    2011-03-29 22:44:59下载
    积分:1
  • StackandQueue
    该ppt包含了栈和队列的数据结构及基本操作,同时还有栈的举例(This ppt contains the stack and queue data structure and basic operation, as well as examples of the stack)
    2013-12-06 21:02:24下载
    积分:1
  • npxkcsj
    数据结构课程设计,多种内部排序的效率分析(Data structure course design, the efficiency of a variety of internal sorting)
    2010-07-07 07:34:56下载
    积分:1
  • yinhangjiasuanfa
    一个很好的银行家算法,能运行(A good banker s algorithm, will be able to run)
    2008-06-14 13:44:24下载
    积分:1
  • ACRush_2_1
    这是acm高手楼天城的比赛代码,很有用哦,对于提高算法非常有用(This is a master of building Tiancheng acm game code, very useful oh, for improving the algorithm)
    2011-06-16 21:00:05下载
    积分:1
  • Circlist_Josephus3_4
    循环链表的应用 循环链表的应用 很方便的实现(cycle Chain cyclic chain of convenience Implementation)
    2006-11-23 19:36:47下载
    积分:1
  • ABC-VC
    蜂群算法C语言实现,附带中文注释,简单易懂(ABC algorithm coded using C programming language)
    2020-09-16 02:17:56下载
    积分:1
  • bag1
    使用不同的方法解决背包问题:本算法采用的是动态规划方法,比较好的解决背包问题。(Use different methods to solve knapsack problem: The algorithm is a dynamic programming approach, a better solution to knapsack problem.)
    2011-07-16 18:40:31下载
    积分:1
  • 696518资源总数
  • 105873会员总数
  • 12今日下载