Jump to content


TI-99/4a disk-based CRPG

226 replies to this topic

#226 PeteE ONLINE  


    Star Raider

  • 70 posts
  • Location:Beaverton, OR

Posted Thu Aug 17, 2017 10:29 AM

Which LZW algorithm do you use?  I'm looking into using LZW and Huffman coding to compress pattern tables.  My goal is something very simple to decompress since I want the decompression code to take up as little space as possible.  I've made a sprite compression scheme that takes advantage of horizontal/vertical symmetry and reflection/rotation, but it won't work as well on pattern tables.

#227 adamantyr OFFLINE  



  • Topic Starter
  • 1,129 posts

Posted Thu Aug 17, 2017 11:33 AM

I use a custom one. I essentially created a library of common english letter combinations that are used by the bottom 31 characters. Characters 32-127 are stored as normal. 128-255 are used to denote a leading space character for the other characters. This gets me around 18-20% compression.


I tested using some LZW creator applications, but they all get way too complex too fast, attempting to encode the ENTIRE text block and use an entire word (16 to 32 bit) for encoding. Plus almost all of them strip out punctuation and are case-insensitive, which I NEED both of.


My only thought is if I could use the 128-255 range for more keyword replacement, I may get slightly better results, but I would need a means to analyze a large text block and cleanly identify the most optimal matches. I've decided for now to forge forward with my current system since it's better than nothing; I can always investigate better compression later.


Here's an assembly snip of my encoding/decoding algorithm:


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users