整数序列的压缩算法
Are there any good compression algorithms for a large sequence of integers (A/D converter data). There is similar question
But the data is different in my case. It can be negarive or positive and changing like wave data.
EDIT1:sample data added
Please refer to this file for a data sample
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
一般来说,如果您对信号有一些了解,请使用它根据先前的值来预测下一个值。然后 - 压缩预测值和实际值之间的差异。
如果预测良好,差异就会很小,并且压缩效果也会很好。
如果没有看到数据并了解其物理性质,任何更具体的事情都是不可能的。
更新:
如果预测确实很好并且使用了有关依赖关系的所有知识,则差异可能是独立的,并且算术编码之类的东西适用于它们。
Generally if you have some knowledge about the signal, use it to predict next value basing on previous ones. Then - compress difference between predicted and real value.
If prediction is good, differences will be small and their compressing will be good.
Anything more specific is unlikely possible without seeing the data and knowing about its physical nature.
update:
If the prediction is really well and uses all knowledge about dependencies, the differences are likely to be independent and something like arithmetic encoding would work for them.
您需要 Delta 编码,然后需要应用 RLE 或 Golomb 代码。哥伦布码可以与霍夫曼码一样好。
You want a Delta Encode and then you want to apply a RLE or a Golomb Code. The Golomb Code can be as good as a Huffman Code.
几乎任何标准的字节串压缩算法都可以应用;毕竟,任何数据文件都可以解释为有符号整数序列。您认为您的特定整数有什么特别之处,可以使它们适合某些更具体的算法吗?你提到了波浪数据;也许看看FLAC,它是为音频数据设计的;如果您的数据具有相似的特征,那么这些技术可能很有价值。
Nearly any standard compression algorithm for byte strings can be applied; after all, any file of data can be interpreted as a sequence of signed integers. Is there something special about your particular integers that you think will make them amenable to some more-specific algorithm? You mention wave data; maybe take a look at FLAC which is designed for audio data; if your data has similar characteristics those techniques may be valuable.
您可以比较数据,然后在合适的子区域(即拐点之间)应用 RLE。
You could diff the data then apply RLE on suitable subregions (i.e. between inflection points).