C Library for compressing sequential positive integers
问题 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 example, a very naive solution would be an index array as follows: uint64 idx[] = { 0, 20, 500, 1024, ..., 103434 }; Which says that the first string is at position 0, the second at position 20, the third at position 500 and the nth at position 103434. The positions are always non-negative 64 bits integers in sequential