What about this:
pack your strings with a table like this
224 times vocal + consonant pairs
and 32 for single characters
Now you can pack your record and everything below 32 is a single character, everything else are pairs of vocal + consonant.
Now take 26 records type DATA, record id 0 to 26 and add them to your prc (use pilrc for it) each record contains a struct like:
- number of allocated bytes for this word
- packed word
for one starting character.
Wouldn't it be enough?
You could also find a better packing, by having a table ordered with a fixed system of likelyness of characters or character combinations as huffman table. But with storing each time the number of bytes, which the packed word takes, you can easely step over the wordlist without depacking it first. You can add some markers to speed up searching.

* understandable [yes] [no] [maybe]
* helpful [yes] [no] [maybe]

Henk

Robert Purcell wrote:
True, but this gets back to my original question. There are several word games out there that have word
lists in the order of 40,000+ My current method of
doing things limits me because the largest resource
database that I can attached to a PRC is 64kb. If I
want a word list of 40,000 words, I would need
multiple resources to reach 40,000 words (approx
200k).

There's something "special" that these other
developers know that I don't. How are they able to
store such large word lists (40,000+) and embed them
efficiently into a single PRC, and yet have no
noticeable delay in the game for decompression?? I'm
stumped! :(

Thanks for your help!

-Robert



You wouldn't need any more databases than you have
now. When you load the program, instead of trying to decompress
everything into memory, you just create a new database and decompress it into
that.

another possibility is that you could compress each
word individually and when you want to search for a word, compress it
and search for it's compressed version. You might not be able to get very
good compression ratios like that though.

Robert Purcell wrote:

That's a pretty good idea about decompressing into
another database...I hadn't thought about that. But,
this still leaves me with the problem of how to
attach

this database inside the PRC. I don't want the
end-user to have to load 2 files (PRC and PDB). I
just want a single PRC file.


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



--
-------------------------------------------------------------------------
[EMAIL PROTECTED]                                       www.metaviewsoft.de

<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";></A>
-------------------------------------------------------------------------


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to