How to compress small strings

后端 未结 7 1305
没有蜡笔的小新
没有蜡笔的小新 2021-02-01 09:22

I have an sqlite database full of huge number of URLs and it\'s taking huge amount of diskspace, and accessing it causes many disk seeks and is slow. Average URL path length is

7条回答
  •  死守一世寂寞
    2021-02-01 09:56

    Have you considered using static Huffman coding?

    You could use your existing body of URLs to compute Huffmann codes over all bytes occuring in URLs according to their frequency. You can then store that set of codes once, and encode all URLs using it. I think it should give decent compression.

提交回复
热议问题