我需要开发一种算法,它可以压缩扩展数据而不需要冗余 [英] I need to develop an algorithm which can compress the expanded data with no redundancy

查看:83
本文介绍了我需要开发一种算法,它可以压缩扩展数据而不需要冗余的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一种算法,可以增加传入数据的大小而不添加任何冗余位。 (认为​​它与压缩数据相反)

制作另一个算法来反转上面的过程,这样我们就可以得到原始数据。

为两者编写python脚本,至少可以扩展字符串





我尝试过:



我尝试转换字符串的ascii值,以便压缩可以完成

解决方案

< blockquote>可能这篇文章对你很有意思:实现霍夫曼自适应压缩256色深度图形图像的算法 [ ^ ]。



如果您还有其他问题,请随时将其发布为回复我的解决方案来到这里。 :)

Write an algorithm which can increase the size of data passed into it without adding any redundant bits. (Think it as opposite of compressing the data)

 Make another algorithm to reverse the process above so we can get original data.

 write python scripts for both which at least can extend strings



What I have tried:

I have tried converting the ascii value of charachters so that compressing could be done

解决方案

Probably, this article would be interesting to you: Implementing the Huffman adaptive algorithm to compress 256 colors depth graphics images[^].

If you've got any more questions, just feel free to post them as the reply to my solution that comes here. :)


这篇关于我需要开发一种算法,它可以压缩扩展数据而不需要冗余的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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