Author Topic: Text compression for AXE programs  (Read 6792 times)

0 Members and 1 Guest are viewing this topic.

Offline gtaforever00

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +4/-0
    • View Profile
Re: Text compression for AXE programs
« Reply #15 on: November 01, 2011, 10:31:02 pm »
Ok since the last few posts, I have decided just to start over and rebuild the algorithm from scratch. :o  I had to add another bit to the data to make 64 characters.  The maximum compression would be around 25%.  I had to add a little data, but hopefully stay in the 20's. ::)  I have decided to use Quigibo's idea with the decoder.  Thanks for idea Quigibo. ;D  I will have rules on how to uppercase the first letter of every sentence and every single I that is part of the sentence structure.  It will automatically uppercase the first word of every sentence, uppercase every singe I, and if you want a certain character uppercase then all you have to do is add a token in front of the character to make it uppercase.  It adds a little more space to the data, but you get more control and more compression than using other ideas.

All the letters, numbers, and countless symbols will be usable.  I may start a poll to see what would be most wanted on the special symbols.  Well I think I am going to start building this beast! :evillaugh:
« Last Edit: November 02, 2011, 02:14:01 am by Qwerty.55 »

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Text compression for AXE programs
« Reply #16 on: November 02, 2011, 10:36:27 am »
Good idea with the uppercase letters! cant wait to see this when its done.

Offline gtaforever00

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +4/-0
    • View Profile
Re: Text compression for AXE programs
« Reply #17 on: November 03, 2011, 02:29:23 pm »
Well I finally got the compression engine made.  It outputs in hex to TI-OS Str2 and the input is a string in the TI-OS Str1.  On the decompression,  I will probably store the decoded text in an appvar.  Does that sound ok to everyone?  I want to try and not use any free ram or variables, as I want this to be easily incorporated into any program.  I will probably use the subroutine variables r1 - r6 and the appvar.  The compression is around 20% to 25%.  The more characters you have the more compression it seems to do.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Text compression for AXE programs
« Reply #18 on: November 03, 2011, 02:44:23 pm »
Cool! Lowercase supported?
If you like my work: why not give me an internet?








Offline gtaforever00

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +4/-0
    • View Profile
Re: Text compression for AXE programs
« Reply #19 on: November 04, 2011, 01:31:56 pm »
Well here is a screenshot of the current state:




Str1 is the input it is 151 bytes
Str2 is the output and is 119 bytes O.O
Str3 is the output in hex it is 227 bytes

Instead of the Hex output,  I could just use the raw output but it does not always look pretty in TI-OS but would save space in the source.

I have started on the decompression and it is going well so far.  I have also thought about doing maybe a simple lzw compression on the already compressed data to compress it even more or even as the primary compression technique if it yields better results. ???  

I will still take any suggestions you may have.  I feel getting input from a group of users that would use the tool will result in a better program in the end.   ;D

Cool! Lowercase supported?

Yes lowercase will be supported through the decompression.
« Last Edit: November 07, 2011, 12:35:25 pm by gtaforever00 »

Offline gtaforever00

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +4/-0
    • View Profile
Re: Text compression for AXE programs
« Reply #20 on: November 05, 2011, 10:18:52 pm »
Ok here is another screenie for you all. :hyper:



23% is not too bad.  The decompression engine is coming along nicely.  I am just working out a few bugs in the code and hopefully to finish here soon.
« Last Edit: November 07, 2011, 12:38:57 pm by gtaforever00 »

Offline gtaforever00

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +4/-0
    • View Profile
Re: Text compression for AXE programs
« Reply #21 on: November 07, 2011, 02:21:07 pm »
Ok here is every character available on the calculators:



If you want to post the top 10 symbols you would want the most and a possible token to use for its representation on calc.

I already have all letters, numbers, period, question mark, exclamation, comma, single quote, opening parenthesis, closing parenthesis, colon, and negative sign so please do not post these again.

Example:
    Hex character / TI on-calc token
1. 05h (right pointing arrow) / > token
2. 3Bh (semi colon)/ i (complex) token
3. F2h (money sign) / pi symbol token


Hex (row|column)h

« Last Edit: November 07, 2011, 02:38:54 pm by gtaforever00 »