在计算机科学和信息论中,霍夫曼编码是一种用于无损数据压缩的熵编码算法。该术语指的是使用可变长度代码表对源符号(例如文件中的字符)进行编码,其中可变长度代码表是根据每个符号出现的估计概率以特定方式导出的。源符号的可能值。它是由 David A. Huffman 在攻读博士学位时开发的。麻省理工学院的学生,并发表在 1952 年的论文“最小冗余码的构造方法”中。
You could give Huffman coding a try. Implementing Huffman coding is a pretty standard assignment in many CS programs.
From Wikipedia.
In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol. It was developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".
Take a look at gzip and bzip2. Both of these are widely used file compression algorithms that compress better than .zip does, however both of them are usually used only to compress a single file. In order to create archives, both gzip and bzip2 rely on a separate tar application.
If you would write a single application that could manage an archive containing gzipped/bzip2ed files, like winzip, that would indeed be simpler than raw gzip/bzip2.
发布评论
评论(4)
看一下 zlib。
Take a look at zlib.
您可以尝试霍夫曼编码。在许多计算机科学项目中,实现霍夫曼编码是一项相当标准的任务。
来自维基百科。
You could give Huffman coding a try. Implementing Huffman coding is a pretty standard assignment in many CS programs.
From Wikipedia.
快速、简单且易于使用的 C++ ZIP 压缩实用程序:
Zip Utils - 干净、优雅,简单,C++/Win32
Quick, simple, and easy to use ZIP compression utilities for C++:
Zip Utils - clean, elegant, simple, C++/Win32
看看 gzip 和 bzip2。这两种都是广泛使用的文件压缩算法,其压缩效果比 .zip 更好,但是它们通常仅用于压缩单个文件。为了创建档案,gzip 和 bzip2 都依赖于单独的 tar 应用程序。
如果您编写一个可以管理包含 gzipped/bzip2ed 文件的存档的应用程序(例如 winzip),那么这确实比原始 gzip/bzip2 更简单。
Take a look at gzip and bzip2. Both of these are widely used file compression algorithms that compress better than .zip does, however both of them are usually used only to compress a single file. In order to create archives, both gzip and bzip2 rely on a separate tar application.
If you would write a single application that could manage an archive containing gzipped/bzip2ed files, like winzip, that would indeed be simpler than raw gzip/bzip2.