Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: leafy on February 03, 2011, 01:26:44 am

Title: Storing Text in Axe
Post by: leafy on February 03, 2011, 01:26:44 am
What is the most efficient way to store text in Axe and then display it on the screen? I've noticed that when I use a direct text function it takes up a lot of memory.
Title: Re: Storing Text in Axe
Post by: Builderboy on February 03, 2011, 01:34:25 am
What do you mean by the direct text function?  The easiest way to store text is simply to "Text"->Str1.  But I have a feeling that you already tried that and didn't like the memory rates you were getting?
Title: Re: Storing Text in Axe
Post by: leafy on February 03, 2011, 02:12:00 am
Yeah,  was wondermg if there was any way to compress text.
Title: Re: Storing Text in Axe
Post by: Builderboy on February 03, 2011, 02:35:00 am
You could always try huffman compression, but thats pretty complex.  How much text do you have?
Title: Re: Storing Text in Axe
Post by: Quigibo on February 03, 2011, 03:38:15 am
If you don't use any special characters, you could cut off the high bit of each letter, that would reduce the size 12.5%.  If its all upper-case, you can do a direct mapping with only 6 bits which could compress it by 25%. Otherwise, huffman is really good at text compression (You might be able to get up to 50% compression) but the algorithm is so long and complicated that it might only be worth it if you had over 5k of text.  Another suggestion is to use a special character that you never use as a "word replacer" for common words.  Lets say that character [FB] is never used, you could have the sequence [FB01] replace the word "the" and [FB02] replace the word "only" etc.  They can even be inserted into the middle of a sentence:  [FB02]"re" would become "there".