<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
For Bibles, the modules are indexed by verses. The index essentially is
a offset and length into a file of the module.<br>
The compression algorithm for the modules is either zip or lzss (turns
out that while supported lzss is not used)<br>
However, it is not simply the compression of the file. Each is
compressed at a different level, either Book, Chapter, or Verse.<br>
These individual compressions are concatenated into a file of the
module. When compressed there is another index<br>
and that is of the start and length of each compressed part.<br>
<br>
The purpose of the module format is to make the retrieving of verses
fast.<br>
<br>
Very few of the modules are in OSIS. Most are in ThML or GBF.<br>
<br>
In the jsword.jar you will find
org.crosswire.jsword.examples.APIExamples. This class provides the
fundamental principles behind getting OSIS or plain text from a module.
It should be pretty easy to follow.<br>
<br>
If you load up the project into Eclipse 3.x (found at <a class="moz-txt-link-abbreviated" href="http://www.eclipse.org">www.eclipse.org</a>)
and load up the projects, you will find it pretty easy to run it.
Alternatively, you can modify jsword.sh in the binary distribution to
run it. While a couple of the jars are not needed, it is easiest to use
them all.<br>
<br>
It is easiest to run jsword.sh first as is. That will set up the needed
directories and help you download one or more modules into the location
that the code expects them to be.<br>
<br>
Read, James C wrote:
<blockquote
cite="mid6B84A53BD25BCA46B070A05DD8C8C9F813A296@KUDBEX01.kuds.kingston.ac.uk"
type="cite">
<pre wrap="">Thanks for the info.
One last question though. I still don't understand the format of the modules. The rawtext modules open up with a text editor or a hexeditor just as it says on the tin (as raw text). Whereas the ztext modules open up as encrypted garbage. Are these modules just encrypted text files? If so is there a reason for the encryption? I read the info for one who would like to submit a module that they should prepare it as OSIS and submit that which is then transformed into a module. Why would we be transforming from OSIS to module format(whatever that may be) and then back to OSIS when we want to do something with it?
Finally if at all possible could I be sent a simple example of a java class that accesses a module and performs a simple action with the text please? It would save me some time in working throught the API and guessing which are the relevant methods and it would also be very greatly appreciated.
James Christian
This email has been scanned for all viruses by the MessageLabs Email
Security System.</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
jsword-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
</pre>
</blockquote>
</body>
</html>