[sword-devel] HowTo: create ztext module?

L.Allan-pbio paraclete at bibleinverse.org
Tue May 9 06:30:41 MST 2006


> While not simpler, there are ways to compress the files that don't
> use stream compression such that each verse can be handled
> independently.

I'd be interested in how to do this, and still get decent compression.

My limited experience is that if you don't have a large block of data 
(book), then the compression ratio isn't very good. A chapter size 
block results in signficantly larger files. A 4 mb text file comprised 
of about 1200 chapters with "segmented" compression of pieces might 
only get 50% compression, rather than 70% compression. (Bible text 
tends to compress very well.)

IIRC, zlib has a parameter that seems to allow "segmentation" (don't 
recall what it is), but I couldn't figure out how to proceed without 
poor results. Each segment seems to have to contain its "lookup data 
dictionary", so it has to "restart/reset" its internal data about 1200 
times. I would be very interested in how to do compression on 
individual verses and still get decent compression ratios.

I asked how to do this on the zlib list, but didn't get more 
information than what I was already wrestling with (with so-so 
results).



More information about the sword-devel mailing list