[sword-devel] Some other fast search index options
Troy A. Griffitts
Mon, 18 Sep 2000 17:38:51 -0700
> ...sometimes. I've certainly found some STEP books that it wouldn't
> decompress correctly, but that could be just because of me making a
> mistake with the rather obtuse API.
Paul, Paul, Paul.... :)
The compression routine works for lzss compressed data. It knows
nothing about STEP. If the STEP module used the prescribed lzss
compression, then it should work :)
Obtuse!?!?? :) I thought the API was clever 3 years ago! :) It's
really not that bad in my opinion. It gives you some options that might
not be intuitive, like subclassing and overriding only a few methods to
make it work against other datasources besides string buffers, but you
don't HAVE to use these if you don't want to. The simplest use is:
SWCompress *compression = new LZSSCompress();
compressedText = compression.zBuf();
plainText = compression.Buf();
Now that's not TOO OBTUSE is it?!
> ...and not with a very high compression ratio. Far better to
> standardise on something like zlib or bzip2.
Change the above line in the example:
-SWCompress *compression = new LZSSCompress();
+SWCompress *compression = new ZipCompress();
You can make a BZipCompress::SWCompress for us if you really want to.