C Library for compressing sequential positive integers

前端 未结 6 1506
难免孤独
难免孤独 2021-02-05 19:39

I have the very common problem of creating an index for an in-disk array of strings. In short, I need to store the position of each string in the in-disk representation. For exa

6条回答
  •  情深已故
    2021-02-05 20:24

    What exactly are you trying to compress? If you are thinking about the total space of index, is it really worth the effort to save the space?

    If so one thing you could try is to chop the space into half and store it into two tables. First stores (upper uint, start index, length, pointer to second table) and the second would store (index, lower uint).

    For fast searching, indices would be implemented using something like B+ Tree.

提交回复
热议问题