霍夫曼编码在c [英] huffman encoding in c

查看:103
本文介绍了霍夫曼编码在c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何通过huffman encodng技术压缩c语言的链接列表数据?

hi can anybody tell me how to compress a link list data in c language through huffman encodng technique ?

推荐答案

你会在这里找到所需的一切: http://en.wikipedia.org/wiki/Huffman_coding [ ^ ]。



另请参阅本文中的示例引用。



现在,问题不太正确:算法是从你想要压缩的内容中抽象出来的。但它有一定道理,因为链表是存在于内存中的东西,因此您需要为数据开发序列化。请参阅:

http://en.wikipedia.org/wiki/Serialization #C_and_C.2B.2B [ ^ ],

http:// www .boost.org / doc / libs / 1_46_1 / libs / serialization / doc / index.html [ ^ ](是的,我建议使用boost序列化)。



基本上,这就是你所需要的。



祝你好运,

-SA
You will find all you need here: http://en.wikipedia.org/wiki/Huffman_coding[^].

See also the referenced to examples in this article.

Now, the question is not quite correct: the algorithm is abstracted from the content you want to compress. But it makes some sense, because a linked list is something which resides in memory, so you will need to develop serialization for your data. Please see:
http://en.wikipedia.org/wiki/Serialization#C_and_C.2B.2B[^],
http://www.boost.org/doc/libs/1_46_1/libs/serialization/doc/index.html[^] (yes, I would recommend boost serialization).

Basically, this is all you need.

Good luck,
—SA


这篇关于霍夫曼编码在c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆