关键字:哈夫曼树;二进制编码;二进制译码;文件流
Abstract
This course is designed to computer engineering specialty first course design, the main training we use the C language and learned data structure knowledge structure tree hoffmann and coding and decoding, and in the file reading and writing out, for the follow-up to the computer specialized curriculum the purpose of preparation.
With the right for n a leaf node, can build many different forms of binary tree, hoffmann tree is one with right path length (WPL) to be the smallest, making for a binary tree right path (WPL) with minimum, namely needs in the process of constructing the greater the value of the right to make its leaf nodes from the root node more close, and the smaller the weights of the leaf nodes from the root node more far, through the application of the algorithm to hover tempting mann, hoffmann is constructed tree. The capital letters and the metric Spaces input to run the program interface, establish) tree corner, then the parents of children with a watch chain storage structure of nodes, and then a 26 capital letters and Spaces for encoding and decoding, will run the program the result showed that in the screen, then using C language of the file learned knowledge, use fputc , fopen function, fclose, will "THIS PROJECT IS MY FAVORITE" string and the binary code to TXT form of reading and writing to file, and stored in a D a plate. Use hoffmann tree algorithm, not only can carry large amounts of data, and can greatly improve the data information transmission rate, reduce the transmission cost.
Keywords:Huffmantree; Binary code;Binary decoding;Document flow
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页