文件名称:2
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个哈夫曼编码、译码系统。对一个ASCII编码的文本文件中的字符进行哈夫曼编码,生成编码文件;反过来,可将编码文件译码还原为一个文本文件。
(1) 从文件中读入任意一篇英文短文(文件为ASCII编码,扩展名为txt);
(2) 统计并输出不同字符在文章中出现的频率(空格、换行、标点等也按字符处理);
(3) 根据字符频率构造哈夫曼树,并给出每个字符的哈夫曼编码;
(4) 图形化输出哈夫曼树、哈夫曼编码;
(5) 将文本文件利用哈夫曼树进行编码,存储成压缩文件(编码文件后缀名.huf)
(6) 用哈夫曼编码来存储文件,并和输入文本文件大小进行比较,计算文件压缩率;
(7) 进行译码,将huf文件译码为ASCII编码的txt文件,与原txt文件进行比较。
-The design of a Huffman encoding, decoding system. On a ASCII encoded characters in text files Huffman coding, to generate an encoded document in turn, the encoded file decoding back into a text file.( 1) from the document read any English short essay ( file for the ASCII encoding, TXT extension ) ( 2) statistics and the output of different characters in the article appears in the frequency (spaces, newlines, punctuation but by character processing ) ( 3 ) according to the frequencies of characters Huffman tree structure, and gives each character of the Huffman coding ( 4) graphical output, Huffman tree Huffman coding ( 5) will be a text file using Huffman tree coding, stored as a compressed file ( coding file name suffix . HUF )( 6) the use of Huffman coding to store files, and to input text file size compared to calculate, file compression rate ( 7) decoding, the HUF file decoding for ASCII encoding txt files, and txt files are compared.
(1) 从文件中读入任意一篇英文短文(文件为ASCII编码,扩展名为txt);
(2) 统计并输出不同字符在文章中出现的频率(空格、换行、标点等也按字符处理);
(3) 根据字符频率构造哈夫曼树,并给出每个字符的哈夫曼编码;
(4) 图形化输出哈夫曼树、哈夫曼编码;
(5) 将文本文件利用哈夫曼树进行编码,存储成压缩文件(编码文件后缀名.huf)
(6) 用哈夫曼编码来存储文件,并和输入文本文件大小进行比较,计算文件压缩率;
(7) 进行译码,将huf文件译码为ASCII编码的txt文件,与原txt文件进行比较。
-The design of a Huffman encoding, decoding system. On a ASCII encoded characters in text files Huffman coding, to generate an encoded document in turn, the encoded file decoding back into a text file.( 1) from the document read any English short essay ( file for the ASCII encoding, TXT extension ) ( 2) statistics and the output of different characters in the article appears in the frequency (spaces, newlines, punctuation but by character processing ) ( 3 ) according to the frequencies of characters Huffman tree structure, and gives each character of the Huffman coding ( 4) graphical output, Huffman tree Huffman coding ( 5) will be a text file using Huffman tree coding, stored as a compressed file ( coding file name suffix . HUF )( 6) the use of Huffman coding to store files, and to input text file size compared to calculate, file compression rate ( 7) decoding, the HUF file decoding for ASCII encoding txt files, and txt files are compared.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验报告.doc
2\2.tags
.\2.workspace
.\2.workspace.session
.\2_wsp.mk
.\coder\chartable.c
.\.....\chartable.h
.\.....\coder.mk
.\.....\coder.project
.\.....\Debug\1.txt
.\.....\.....\1.txt.huf
.\.....\.....\1.txt.img
.\.....\.....\1.txt.txt
.\.....\.....\1.txts
.\.....\.....\chartable.o
.\.....\.....\chartable.o.d
.\.....\.....\coder
.\.....\.....\configure.txt
.\.....\.....\configure.txt.huf
.\.....\.....\configure.txt.img
.\.....\.....\core
.\.....\.....\input.txt
.\.....\.....\input.txt.huf
.\.....\.....\input.txt.img
.\.....\.....\main.o
.\.....\.....\main.o.d
.\.....\.....\process.o
.\.....\.....\process.o.d
.\.....\.....\read.o
.\.....\.....\read.o.d
.\.....\.....\write.o
.\.....\.....\write.o.d
.\.....\main.c
.\.....\process.c
.\.....\process.h
.\.....\read.c
.\.....\read.h
.\.....\types.h
.\.....\write.c
.\.....\write.h
.\decoder\chartable.c
.\.......\chartable.h
.\.......\Debug\1.txt.huf
.\.......\.....\1.txt.img
.\.......\.....\chartable.o
.\.......\.....\chartable.o.d
.\.......\.....\configure.txt
.\.......\.....\configure.txt.huf
.\.......\.....\configure.txt.img
.\.......\.....\core
.\.......\.....\decoder
.\.......\.....\input.huf
.\.......\.....\input.huf.txt
.\.......\.....\input.img
.\.......\.....\input.txt
.\.......\.....\main.o
.\.......\.....\main.o.d
.\.......\.....\process.o
.\.......\.....\process.o.d
.\.......\.....\read.o
.\.......\.....\read.o.d
.\.......\.....\tmp123.huf
.\.......\.....\write.o
.\.......\.....\write.o.d
.\.......\decoder.mk
.\.......\decoder.project
.\.......\main.c
.\.......\process.c
.\.......\process.h
.\.......\read.c
.\.......\read.h
.\.......\types.h
.\.......\write.c
.\.......\write.h
.\huff\chartable.cpp
.\....\chartable.h
.\....\huff.pro
.\....\huff.pro.user
.\....\huffview.cpp
.\....\huffview.h
.\....\main.cpp
.\....\mainwidget.cpp
.\....\mainwidget.h
.\....\mainwindow.cpp
.\....\mainwindow.h
.\....\process.cpp
.\....\process.h
.\....\read.cpp
.\....\read.h
.\....\types.h
.\....\write.cpp
.\....\write.h
.\....-build-desktop\1.txt
.\..................\1.txt.huf
.\..................\1.txt.img
.\..................\2.txt
.\..................\2.txt.huf
.\..................\2.txt.img
.\..................\243434
.\..................\chartable.o
2\2.tags
.\2.workspace
.\2.workspace.session
.\2_wsp.mk
.\coder\chartable.c
.\.....\chartable.h
.\.....\coder.mk
.\.....\coder.project
.\.....\Debug\1.txt
.\.....\.....\1.txt.huf
.\.....\.....\1.txt.img
.\.....\.....\1.txt.txt
.\.....\.....\1.txts
.\.....\.....\chartable.o
.\.....\.....\chartable.o.d
.\.....\.....\coder
.\.....\.....\configure.txt
.\.....\.....\configure.txt.huf
.\.....\.....\configure.txt.img
.\.....\.....\core
.\.....\.....\input.txt
.\.....\.....\input.txt.huf
.\.....\.....\input.txt.img
.\.....\.....\main.o
.\.....\.....\main.o.d
.\.....\.....\process.o
.\.....\.....\process.o.d
.\.....\.....\read.o
.\.....\.....\read.o.d
.\.....\.....\write.o
.\.....\.....\write.o.d
.\.....\main.c
.\.....\process.c
.\.....\process.h
.\.....\read.c
.\.....\read.h
.\.....\types.h
.\.....\write.c
.\.....\write.h
.\decoder\chartable.c
.\.......\chartable.h
.\.......\Debug\1.txt.huf
.\.......\.....\1.txt.img
.\.......\.....\chartable.o
.\.......\.....\chartable.o.d
.\.......\.....\configure.txt
.\.......\.....\configure.txt.huf
.\.......\.....\configure.txt.img
.\.......\.....\core
.\.......\.....\decoder
.\.......\.....\input.huf
.\.......\.....\input.huf.txt
.\.......\.....\input.img
.\.......\.....\input.txt
.\.......\.....\main.o
.\.......\.....\main.o.d
.\.......\.....\process.o
.\.......\.....\process.o.d
.\.......\.....\read.o
.\.......\.....\read.o.d
.\.......\.....\tmp123.huf
.\.......\.....\write.o
.\.......\.....\write.o.d
.\.......\decoder.mk
.\.......\decoder.project
.\.......\main.c
.\.......\process.c
.\.......\process.h
.\.......\read.c
.\.......\read.h
.\.......\types.h
.\.......\write.c
.\.......\write.h
.\huff\chartable.cpp
.\....\chartable.h
.\....\huff.pro
.\....\huff.pro.user
.\....\huffview.cpp
.\....\huffview.h
.\....\main.cpp
.\....\mainwidget.cpp
.\....\mainwidget.h
.\....\mainwindow.cpp
.\....\mainwindow.h
.\....\process.cpp
.\....\process.h
.\....\read.cpp
.\....\read.h
.\....\types.h
.\....\write.cpp
.\....\write.h
.\....-build-desktop\1.txt
.\..................\1.txt.huf
.\..................\1.txt.img
.\..................\2.txt
.\..................\2.txt.huf
.\..................\2.txt.img
.\..................\243434
.\..................\chartable.o