[jsword-devel] Module Format
Troy A. Griffitts
jsword-devel@crosswire.org
Thu, 27 Mar 2003 01:40:42 -0800
:)
Joe,
The individual who initially wrote the compressed drivers chose to
use different file names depending upon the BLOCKTYPE of the
compression. The files that you mention that end in bz* are basically
saying that the indecies are BOOK oriented (an entry of the top level
index will identify a compressed block of 1 Bible book) , although the
best place to determine this is from the .conf file.
The declaration and use of the mechanisms, in the code, is in two parts:
Near the top of zVerse you will find the construct:
const char zVerse::uniqueIndexID[] = {'X', 'r', 'v', 'c', 'b'};
Then index names are built with something like this excerpt from the code:
sprintf(buf, "%s/ot.%czs", path, uniqueIndexID[blockType]);
remember %c means CHARACTER, which is replaced by the value of the param
passed (which, I'm sure you knew, but I admit '%czs' does seem to make
the eye just see the CZS as a unit)
Hope this helps,
-Troy.
Joe Walker wrote:
>
> Hi,
>
> My copy of the RSV module contains files with the extension bz* and
> not cz* as read by zVerse.cpp, and I can't find the string bzs in the
> source anywhere that makes sense. What am I doing wrong?
>
> I've spent hours and hours digging through the C source, and either my
> C is very rusty or it is even harder that I imagined to convert C with
> lots of memory/pointer manipulation into Java. Could anyone explain
> the file format of the GZIP compressed modules? My head hurts and I'm
> not making much progress at the moment. Actually doing the
> decompression is easy - it's reading an array of bytes from disk that
> I am struggling with.
>
> Thanks,
>
> Joe.
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel