supporting LZMA streams

2009-01-25

LZMA is a relatively new compression algorithm. It is used in more and more places: 7-zip, the Linux kernel and deb and RPM packages. So adding LZMA to Strigi was a desirable step. The code for LZMA can be downloaded from the 7-zip website. It is in the public domain.

For decompression, only 3 c files are required. I’ve added these to the Strigi repository directly. The decompression interface of LZMA is similar to that of GZip and BZip2. It nevertheless cost me quite a bit of time to figure out how to use it exactly. The result is a Strigi::InputStream class that can be used in the same way as the other decompression classes.

Once the InputStream was written, adding LZMA support to .deb files, .rpm files and jstream:/ was simple.

This improvement, along with a better index, will be released in Strigi 0.6.4 this week.

Comments

Post a comment