在发送端通过一个编码系统对待传输数据编码. 在接收端将传来的数据进行译码. 一个完整的系统应具有以下功能: (1)初始化.从终端读入字符集大小,以及...
代码说明:
在发送端通过一个编码系统对待传输数据编码. 在接收端将传来的数据进行译码. 一个完整的系统应具有以下功能: (1)初始化.从终端读入字符集大小,以及字符和权值,建立 哈夫曼树,并保存. (2)编码.利用以建好的哈夫曼树对正文进行编码,然后保存. (3)译码.利用已建好的哈夫曼树将文件中的代码进行译码,结果打印出来. -At the sending end through a coding system for encoding transmit data treatment. Will be heard in the receiver to decode the data. A complete system should have the following functions: (1) initialization. Read from the terminal character set size, as well as the characters and the right values, the establishment of Huffman trees, and save. (2) coding. used to build the Huffman tree to encode the text and then save it. (3) decoding. the use of the Huffman tree has been built will document the code decoding, the results print out.
下载说明:请别用迅雷下载,失败请重下,重下不扣分!