Looking for a dictionary based .NET text compression library [closed]

喜欢而已 提交于 2019-12-11 06:13:09

问题


I am looking for a .NET dictionary based compression library, something that would allow me 'seed' it with a large list / string of common words which it would use to build its dictionary.

The reason that I want this over LZMA and the like is because I want to independently compress short strings, all of which are quite similar to each other. Visualize compressing a simple children's book, but compressing each page separately. If we were compressing the whole book then LZMA would be good, but it's not so great for shorter strings.

Does any such thing exist?


回答1:


zlib provides dictionary based compression. The functions deflateSetDictionary() and inflateSetDictionary() do exactly what you describe.




回答2:


Built-in GZip: GZipStream Class. You should deploy it as a SQLCLR UDF function for your needs, see How to: Create and Run a SQL Server User-Defined Function by using Common Language Run-time Integration



来源:https://stackoverflow.com/questions/9797518/looking-for-a-dictionary-based-net-text-compression-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!