along with this, you don't need to store the first letter or two - you derive it from the record number. If the first letter is 'a' then that's at record 1, 'b' is record 2, etc. Or the first two letters and you'll have 26*26 records.
Then, don't store the first letter (or two letters) of the word within the record; just the remaining letters. Special case for one or two-letter words, of course... :) - Al - -- original message -- >Maybe if you chopped up the data into fine enough chunks you could make it so a >decompression of a chunk was quick enough.... say partition into aa-, ab-, ac-, ad-, >ae-, af-words, etc. That way if the word was aardvark, you'd just decompress the aa >record, and so on.... > >Kevin > >-----Original Message----- >From: Robert Purcell [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 07, 2003 10:40 AM >To: Palm Developer Forum >Subject: RE: Word Lists for Games > > >That's not a bad idea. At one time I thought about >doing that, but most decompression algorithms work by >building a lookup table as they parse the list. This >requires them to always start from the beginning of >the compressed data. But, as you mentioned, if I >stored all the a-words in a record, then I would only >have to parse the record with a-words. > >However, this would really slow down the game. EACH >and EVERY time that the user selected a word, I would >have to decompress the record and check for a match. >I would suspect this would greatly slow down the >game...which I don't want to do. > >Thanks for your help! > >-Robert > > >>You don't have to uncompress the whole thing to >>search for one word... You >>could arrange it into several records that contained >>the compressed content - >>say record one is all a-words compressed, record two >>is all b-words compressed, >>and so on. That way when you need to look up a word, >>you only uncompress the >>section you need. Might be a bit slower, but you >>won't take up 500k.... >> >>Kevin > >__________________________________________________ >Do you Yahoo!? >Yahoo! Mail Plus - Powerful. Affordable. Sign up now. >http://mailplus.yahoo.com > >-- >For information on using the Palm Developer Forums, or to unsubscribe, please see >http://www.palmos.com/dev/support/forums/ > > >------------------------------------------ >The information in this transmittal and any attachments is privileged and >confidential and is intended only for the recipient(s) listed above. You are hereby >notified that any unauthorized distribution or copying of this transmittal or its >attachments is prohibited. If you have received this transmittal in error, please >notify Invivodata immediately at (831) 438-9550. >------------------------------------------ -- -- Alan Weiner -- [EMAIL PROTECTED] -- http://www.ajw.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
