C Library for compressing sequential positive integers

前端 未结 6 1507
难免孤独
难免孤独 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:07

    Are you running on Windows? If so, I recommend creating the mmap file using naive solution your originally proposed, and then compressing the file using NTLM compression. Your application code never knows the file is compressed, and the OS does the file compression for you. You might not think this would be very performant or get good compression, but I think you'll be surprised if you try it.

提交回复
热议问题