Best Compression algorithm for a sequence of integers

前端 未结 15 1582
离开以前
离开以前 2020-11-29 16:41

I have a large array with a range of integers that are mostly continuous, eg 1-100, 110-160, etc. All integers are positive. What would be the best algorithm to compress thi

15条回答
  •  一整个雨季
    2020-11-29 17:42

    compress the string "1-100, 110-160" or store the string in some binary representation and parse it to restore the array

提交回复
热议问题