English 中文(简体)
反向“jpeg”压缩算法
原标题:Reverse "jpeg" compression algorithm?

I have to write a tool that manages very large data sets (well, large for an ordinary workstations). I need basically something that works the opposite that the jpeg format. I need the dataset to be intact on disk where it can be arbitrarily large, but then it needs to be lossy compressed when it gets read in memory and only the sub-part used at any given time need to be uncompressed on the flight. I have started looking at ipp (Intel Integrated Performance Primitives) but it s not really clear for now if I can use them for what I need to do. Can anyone point me in the right direction?

Thank you.

问题回答

Given the nature of your data, it seems you are handling some kind of raw sample. So the easiest and most generic "lossy" technique will be to drop the lower bits, reducing precision, up to the level you want.

请注意,你需要“选择低轨道”,这与“四舍五入到十强”截然不同。 第2基地的计算机工作,你希望你所有的下限都是“000”,以便尽可能压缩。 这种方法假定,选定的压缩算法将利用可预测的0轨道模式。

另一种更为复杂、更具体的方法是把你的价值观作为指数转化为一个表。 好处是,在你想要时,你可以“瞄准”精确度。 明显的缺点是,表将专门针对分配模式。

其中最重要的是,如果两者之间有某种关系,你可能不会储存价值本身,而是储存价值上值的三角洲。 这将有助于压缩。

为了压缩数据,你将需要通过适当规模的包装,如64KB,“组别”。 在单一领域,任何压缩算法都不会给你带来适当的结果。 这反过来又意味着,每当你想要进入某个领域时,你都需要压缩整个包装,这样,它才能根据你想要做些什么加以调整。 在这种情形下,定期接触更容易处理。

关于压缩算法,由于这些数据将属于“寿命”,你需要非常快,因此获得数据的影响很小。

There are several open-source alternatives out there for that use. For easier license management, i would recommend a BSD alternative. Since you use C++, the following ones look suitable : http://code.google.com/p/snappy/ and http://code.google.com/p/lz4/





相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签