登录
首页 » Visual C++ » HuffanCoding

HuffanCoding

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

  • heapSort.cpp.tar
    这是一个堆排序的算法源程序,算法被单独写成一个函数,希望对大家有用(This is a heap sort algorithm source code, algorithms are written as a separate function, we hope to be useful)
    2013-12-12 14:52:48下载
    积分:1
  • 哈夫曼树解码和编码
    哈夫曼树,基本的数据结构,用来编码和解码、用数组作为存储结构实现,
    2023-04-13 11:00:11下载
    积分:1
  • SelectSort
    选择排序的实现,是一种基本的排序方法,但是时间复杂度相对较大。(Select Sort realization, is sort of a basic, but relatively large time complexity.)
    2012-09-27 22:38:22下载
    积分:1
  • 04huffman_a
    根据最常用的链表法进行huffman编码,可以手工预制权重,例如n=8的时候即可以在文件中写入,输出相应的编码结果(According to the most commonly used method of Chain Huffman coding, manual can be prefabricated weight, For example, n = 8 when it is written in the document, the output corresponding to the coding results)
    2007-05-29 19:15:26下载
    积分:1
  • eightqueen
    利用數據結構中的棧,實現19世紀著名數學家高斯提出的八皇后問題(Stack data structure, to achieve the eight queens problem of the 19th century, the famous mathematician Gauss)
    2012-10-23 08:30:21下载
    积分:1
  • deep-copy
    该代码实现了深拷贝的问题,对于深拷贝进行了一系列的介绍,并且显示其与浅拷贝的区别。(A deep copy of the code issues a series of deep copy for presentation, and shows the difference between a shallow copy.)
    2014-01-03 10:46:48下载
    积分:1
  • luowenfeng
    建立试题库文件,随机产生n个题目; 题目涉及加减乘除,带括弧的混合运算; 利用栈求解表达式的值; 随时可以退出; 保留历史分数,能回顾历史,给出与历史分数比较后的评价( The establishment of test database file, the subject of n randomly generated topics related to addition, subtraction, mixed operations with parentheses use the value of the expression stack solution ready to quit to preserve the historical scores, can look back at history, and history gives the comparison of scores Evaluation 保留历史分数,能回顾历史,给出与历史分数比较后的评价)
    2020-12-29 23:09:01下载
    积分:1
  • Huffman
    霍夫曼编码实验报告,内含源代码,编码原理 (Huffman coding lab report, containing the source code, coding theory)
    2011-06-04 20:44:25下载
    积分:1
  • Monkeys-and-peach
    Monkeys and peach,Monkeys and peach(Monkeys and peach)
    2013-09-01 22:06:42下载
    积分:1
  • @163
    数值计算方法中高斯主元素消元法 在vc环境中运行 用于解方程组(Numerical methods in the Gaussian elimination method, the main elements of the environment in vc run for the solution of equations)
    2011-10-19 20:28:39下载
    积分:1
  • 696518资源总数
  • 105549会员总数
  • 12今日下载