[sword-devel] Announce: Sword/PDA for the Agenda PDA
David J. Orme
sword-devel@crosswire.org
Mon, 22 Oct 2001 11:22:20 -0500
Chris Little wrote:
>I agree, this is really, really cool. :)
>
*blush* Thanks.
>Feel like working on the WinCE
>port? ;)
>
If you look at the development roadmap in the TODO file, there is a
point at which I intend to write a custom Bible-viewer widget for FLTK.
I intend to do this so that platform-independent parts are in a
superclass, and then to get a FLTK, or Win32, or GTK, or *tk
implementation, you just inherit and override four methods in addition
to the constructor and destructor:
// Get the width of a string in pixels
int foo::getTextWidth(char* str);
// Get the height of a string in pixels
int foo::getTextHeight(char* str);
// Draw a string
void foo::drawString(int x, int y, char* str)
// Copy a string to the clipboard
void foo::copyToClipboard(char* str);
After this happens, it will be very straightforward to port to other
platforms/architectures. :-)
>I think we've had some suggestions before that we use a similar type of
>index-based compression. The ZIP/LZSS block compression we use now
>works really well, I believe, and gets module sizes down to the same
>range of about 1.5 to 2 mb for an OT & NT set in Latin-1. (Unicode
>texts will be a little larger until we get SCSU working and in use.)
>
Kewl! The sizes I quote are for a straight index-based compression. I
wonder how easy it would be to add ZIP/LZSS compression on top of that...
>I assume index-based compression could actually improve standard search
>times if we rewrote the search engine to make use of it directly,
>
Yes.
>But with regular
>expression searches, the index-based compression would increase search
>times even more because we'd end up having to reconstruct ever verse
>anyway.
>
Maybe you can use the index even for RE-based searches:
For a straight indexed search, you look up the words you are searching
for in your word dictionary, and convert them to their corresponding
indexed representation. You then search for verses containing those
indexes, using the boolean operations specified in the search.
For regular expression-based search, the only change is that instead of
looking up words in the dictionary directly, you select all words in the
dictionary that match your regular expression(s). Then you can convert
that set of words to their corresponding indexes and search for verses
containing those indexes using the appropriate boolean evaluations.
Unless I'm missing something, you can use the index either way without
reconstructing the actual verse text while searching.
Best,
Dave
--
The number of UNIX installations has grown to 10, with more expected.
-- The Unix Programmer's Manual, 2nd Edition, June 1972