登录
首页 » Visual C++ » HuffanCoding

HuffanCoding

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

  • Haffman
    将一组数组转换为哈夫曼编码,使用数据结构中的二叉树功能实现(Convert an array to Haffman code)
    2016-01-30 14:56:20下载
    积分:1
  • a
    说明:  进程死锁.资源分配图的绘制 建立所需数据结构;  使用题目21存成的资源分配图的文件作为输入;  编写资源分配图化简算法;  每化简一步,在屏幕上显示化简的当前结果;  最后给出结论,是否死锁,如思索给出死锁的进程及资源; (Process deadlock. Resource allocation mapping  establish the required data structures  Use title 21 deposit into resource allocation graph file as input  writing resource allocation map simplification algorithm  Each simplification step, on-screen display simplification of the current result  Finally, the conclusion of a deadlock, deadlock is given as thinking processes and resources )
    2013-07-04 19:50:58下载
    积分:1
  • mapsearch
    数据结构,关键路径问题,设计并实现关键路径的一种应用,采用图的算法(Data structure, critical path problem, using graph algorithm)
    2016-01-09 17:34:45下载
    积分: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
  • 44
    说明:  给定程序中,函数fun的功能是:将a所指3×5矩阵中第k列的元素左移到第0列,第k列以后的每列元素依次左移,原来左边的各列依次绕道右边。 例如,有以下矩阵: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 若k结果为2,程序执行结果为: 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。 注意:源文件存放在考生文件夹下的BLANK1.C中 不得增行或删行,也不得更改程序的结构! (A given program, function fun feature is: a 3 × 5 matrix referred to in the first k elements of the left column to move Section 0, the k elements of each column after column followed by the left, the original columns in the left turn Bypass on the right. For example, the following matrix: 123,451,234,512,345 If k is 2, the program execution results: 345,123,451,234,512 in the program underscore the right content at the fill and to remove the underscore, so that the program reach the right result. Note: The source files in the folder of BLANK1.C candidates are not allowed by the line or delete line, nor change the structure of the program!)
    2011-08-11 07:53:10下载
    积分:1
  • hafumanTree
    数据结构课程设计,在VC环境下完成,利用哈夫曼树原理,主要功能是实现字符的压缩和解压缩,设计脉络清晰,易懂(Data structure course design, completed in the VC environment, using Huffman tree principle, the main function is to achieve the character of the compression and decompression, design, clear structure, easy to understand)
    2011-01-02 13:15:23下载
    积分:1
  • strcon
    对于给定的n个字符串,请找出一种最佳的连接方式,使得采用该连接方式得到的字符串在所有连接的结果中,字典序最小(For a given n-string, find an optimal connection, making use of the connection string to get the results in all connections, the lexicographic minimum)
    2011-09-02 16:52:40下载
    积分:1
  • Hanoi
    简单的汉诺塔算法,采用归约算法的思想,实例是三个盘子,三个柱子(Simple HANOR algorithm)
    2012-07-16 20:48:59下载
    积分:1
  • shiyan1
    数据结构上机操作实验的实验1,线性表的基本操作!!!(the basic operation of sq of date structure)
    2011-12-11 18:49:06下载
    积分:1
  • 约瑟夫环的循环链表实现
    约瑟夫环的循环链表实现,这个程序比较完整,有需要做试验的请速速下载。(Josephus cycle Chain achieved, the procedure is complete, the pilot needs to be done urgently requested to download.)
    2005-07-03 19:38:38下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 31今日下载