I have a huge array of incremental integers and I need to compress them.
All numbers are unique and progressively increasing, but some numbers are cutted-off from sample, thus it´s impossible to express it as a 1 - 6000.
I´ve readed one post at stackoverflow.com where is:
And what if I will have separate text document that would contain the missing numbers? I don´t think so that this approach could lead to 100% compression ratio.First, preprocess your list of values by taking the difference between each value and the previous one (for the first value, assume the previous one was zero). This should in your case give mostly a sequence of ones, which can be compressed much more easily by most compression algorithms.
I expect at least 99.95% space saving - or 100% if it´s possible which I don´t think.
Thanks a lot.
CompressMaster