5 哈夫曼编码和解码

所属分类:JavaScript/JQuery
开发工具:JavaScript
文件大小:1091KB
下载次数:2
上传日期:2017-11-29 09:18:20
上 传 者bianyc
说明:  哈夫曼编码是不等长编码。利用哈夫曼编码能实现了数据的压缩,在进行通信时,可以大大提高信道利用率,缩短信息传输的时间。本实习要求对发送端待发送的信息进行哈夫曼编码,在接收端进行解码,还原为原来的信息。测试数据:自己找一段不小于2000字符的英文文章,保存为文件。(1) 所有信息输入与输出要以图形化的可视界面,如:用对话框选择打开的文件、字符的出现频率的统计信息能以文件的方式保存,能以表格的形式输出到显示器等。(2) 编码后的信息要以文件的方式保存。能比较编码前和解码后的两个文件是否一致。 (3) 能将建立的哈夫曼树以图形的方式显示。
(The Huffman code is a unequal length encoding. The data compression can be realized by Huffman code. When communication is carried out, the channel utilization rate can be greatly improved and the time of information transmission can be shortened. This practice requires the Hoffman code for the message to be sent at the sending end, decode it at the receiving end and restore it to the original information. Test data: find an English article that is not less than 2000 characters, and save it as a document. (1) all information input and output should be graphical visual interface, such as selecting open files with dialog boxes, the statistical information of the frequency of characters can be saved in file mode, and can be output to the monitor in form. (2) the encoded information should be saved in the form of a file. Can compare whether the two files before and after the encoding are consistent. (3) the Hoffman tree can be displayed in a graphic manner.)

文件列表:
5 哈夫曼编码和解码 (0, 2017-11-18)
5 哈夫曼编码和解码\files (0, 2017-10-20)
5 哈夫曼编码和解码\files\aticle.txt (1179, 2017-10-19)
5 哈夫曼编码和解码\files\result1 (5048, 2017-11-28)
5 哈夫曼编码和解码\files\result10 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result11 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result12 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result13 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result14 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result15 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result16 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result17 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result18 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result19 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result2 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result20 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result21 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result22 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result23 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result24 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result25 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result26 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result27 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result28 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result29 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result3 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result30 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result31 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result32 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result33 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result34 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result35 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result4 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result5 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result6 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result7 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result8 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result9 (5048, 2017-10-20)
5 哈夫曼编码和解码\files\result_freq1 (329, 2017-11-28)
5 哈夫曼编码和解码\files\result_freq10 (329, 2017-10-20)
... ...

# ms [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) Use this package to easily convert various time formats to milliseconds. ## Examples ```js ms('2 days') // 172800000 ms('1d') // 8***00000 ms('10h') // 36000000 ms('2.5 hrs') // 9000000 ms('2h') // 7200000 ms('1m') // 60000 ms('5s') // 5000 ms('1y') // 31557600000 ms('100') // 100 ``` ### Convert from milliseconds ```js ms(60000) // "1m" ms(2 * 60000) // "2m" ms(ms('10 hours')) // "10h" ``` ### Time format written-out ```js ms(60000, { long: true }) // "1 minute" ms(2 * 60000, { long: true }) // "2 minutes" ms(ms('10 hours'), { long: true }) // "10 hours" ``` ## Features - Works both in [node](https://nodejs.org) and in the browser. - If a number is supplied to `ms`, a string with a unit is returned. - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. ## Caught a bug? 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 2. Link the package to the global module directory: `npm link` 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! As always, you can run the tests using: `npm test`

近期下载者

相关文件


收藏者