登录
首页 » Visual C++ » HuffanCoding

HuffanCoding

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

  • FreeTree
    无环连通图G=(V, E)亦称为自由树T,其直径是树中所有顶点之间最短路径的最大值,设计一个算法求T的直径(Acyclic connected graph G = (V, E) is also known as free tree T, whose diameter is the tree of shortest paths between all vertices maximum design an algorithm for the diameter of T)
    2013-10-29 16:31:47下载
    积分:1
  • 哈夫曼树解码和编码
    哈夫曼树,基本的数据结构,用来编码和解码、用数组作为存储结构实现,
    2023-04-13 11:00:11下载
    积分:1
  • 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
  • maze
    c语言完成的数据结构几个小算法游戏包括迷宫求解等(C language of complete data structure several small algorithm game includes maze solution, etc )
    2012-03-29 20:37:18下载
    积分:1
  • lab07
    本例主要设计查找的有关算法,例如有序表的查找和顺序标的查找,顺序查找、折半查找及二叉排序树上查找的基本思想和算法实现等。(In this case mainly designed to find the relevant algorithm, such as an ordered list of the find and order the subject to find, sequential search, binary search and binary sort tree to find the basic idea and algorithm.)
    2013-05-12 22:01:58下载
    积分:1
  • permutations
    组合数学全排列,包含有六种全排列的方法,字典序法(math of permutations)
    2011-12-12 10:51:16下载
    积分:1
  • maze
    实现经典问题老鼠迷宫,并用坐标将路径显示出来(Achieve classic problem rat maze, and coordinate with the path displayed)
    2016-05-25 22:56:59下载
    积分:1
  • xianxingbiao
    另外一个可以实现线性表的程序,简单的操作,值得初学者的借鉴(Another table can achieve a linear process, simple to operate, it is worth drawing beginners)
    2007-12-07 20:20:32下载
    积分: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
  • 2_24to2_28
    双向链表 清华大学 出版社 《数据结构 C++》 源代码实现(Tsinghua University Press doubly linked list <data structure, C++> source code)
    2011-02-05 22:08:53下载
    积分:1
  • 696524资源总数
  • 103920会员总数
  • 65今日下载