compression algorithm for sorted integers

后端 未结 6 1879
我寻月下人不归
我寻月下人不归 2020-12-09 11:12

I have a large sequence of random integers sorted from the lowest to the highest. The numbers start from 1 bit and end near 45 bits. In the beginning of the list I have numb

6条回答
  •  无人及你
    2020-12-09 12:09

    If your sequence is made up of pseudo-random numbers, such as might be generated by a typical digital computer, then I don't think that any compression scheme will beat, for brevity of representation, simply storing the code for the generator and whatever parameters you need to define its initial state.

    If your sequence is made up of truly random numbers generated in some non-deterministic way then the other answers already posted offer a variety of good advice.

提交回复
热议问题