Skip to Content
数据压缩入门
book

数据压缩入门

by Colt McAnlis, Aleks Haecky
April 2020
Intermediate to advanced
210 pages
4h 47m
Chinese
Posts & Telecom Press
Content preview from 数据压缩入门
52
|
第
5
章
5.2.3
 编码和解码
恭喜你!现在你已成功地为数据集构造了
VLC
,可以用它们进行编码了。只要遍历输入
流,对遇到的每一个符号,写下其对应的码字作为输出就可以了。
与其他
VLC
一样,为了解码,也需要将符号码字对应表与压缩后的内容放在一起传输,
然后再按照标准的
VLC
的解码过程进行解码。
由于创建哈夫曼树(需使用计算资源)要比传输符号码字对应表(会增加数据流大小)困难
得多,因此总是应该将码字对应表加在数据流的前面,而不是在解码时再重新创建一次
3
。
5.2.4
 实际的实现方法
在过去的
50
多年里,人们已经对哈夫曼编码进行了大量的分析,不但产生了各种能在特
定性能或内存阈值下工作的变体,也有针对特定概率分布的各种变体。关于哈夫曼算法及
其复杂性和优化方法,已经出版了不少图书。
不过,要说的也只有这么多了,因为我们相信当你试着去使用这些算法时,你已经掌握了
足够多的原理知识去理解数据与算法如何交互。
45
走近哈夫曼
戴维
•
艾伯特
•
哈夫曼(
David Albert Huffman
,
1925
年
8
月
9
日—
1999
年
10
月
7
日 ),
是计算机科学领域的一位先驱,因发明哈夫曼编码而闻名于世
4
。
1951
年,哈夫曼还是一名电气工程专业的研究生,在信息论这一课程的结课考核中,
他和同学们可以选择写学期论文或参加期末考试。教这门课的教授罗伯特
•
范诺布置
了一个乍看似乎很简单的问题作为学期论文:要求学生们找出最有效的使用二进制编
码表示数字、字符以及其他符号的方法。除作为智力训练之外,如果能找出这样的编
码方法,也将使得对通过计算机网络传输的信息或计算机内存中存储的内容进行压缩 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115534170