[jsword-devel] PersonalJava version of JSword
Aleksander Rozman - Andy
jsword-devel@crosswire.org
Mon, 12 Jan 2004 21:19:37 +0100
At 1/11/2004, you wrote:
> >>I am not sure whether zipping would be useful, since I think it would be
> >>good to be able to do random access in the file. And the memory
> >> limitation
> >>is not as much "disk" space (i.e. memory stick, 128MB in my case), but
> >>more the RAM. Reading a whole book at once does not seem like an option
> >> to
> >>me.
> >
> > Hi Eric!
> >
> > Java has a nifty class called Properties. We could create index with it,
> > which would make loading very easy. Java can implement LineReader class
> > whicg works with Streams, so we could easiliy read from files. For example
> > Jn 1, 12-30 (John... I don't know official abvbrev,. since my langauge
> > uses
> > different Letters..), we would read property Jn, which would display file,
> > then Jn1-12, which would point us to line 12 of chapter 1 of John
> > Evangelium, next line has one line more, etc, etc... Ram usage would be
> > minimal.
>
>Aren't Properties read all at once, using load()? That would mean, that
>all properties, i.e. the whole bible, would be read at once and stored in
>memory, which is not suitable for a P800.
Yes. But bible would be plain text files.. Properties would be used for
index only...
> > I can't tell you how it;s done now, but I think that on each query XML
> > parser is called and text parsed, to get the results...
>
>Since parsing an XML file would be done by starting at the beginning, and
>scanning through the file until you find the location you were looking
>for, this does not seem fast enough, at least on a slower device.
>I have to say that I like the compressed format of Stephen *a lot*,
>perhaps enhanced for extra info that is now encoded in XML.
I didn't plan to do xml parser. I was looking for sollution similar to
Spehen's, but plain text, no decoding of bible or anything. Stephen
implemented some coding style which uses less data, I was working toward
normal text format bible, that is in jar (so it's compressed to 1.5 Mb),
and is much easer to access...
Take care,
Andy
>*Erik.
>_______________________________________________
>jsword-devel mailing list
>jsword-devel@crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel
**************************************************************************
* Aleksander Rozman - Andy * Fandoms: E2:EA, SAABer, Trekkie, Earthie *
* andy@kksonline.com * Sentinel, BH 90210, True's Trooper, *
* andy@atechnet.dhs.org * Heller's Angel, Questie, Legacy, PO5, *
* Maribor, Slovenia (Europe) * Profiler, Buffy (Slayerete), Pretender *
* ICQ-UIC: 4911125 *********************************************
* PGP key available * http://www.atechnet.dhs.org/~andy/ *
**************************************************************************