Author Topic: Text Compressor  (Read 5449 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Text Compressor
« on: January 05, 2012, 06:38:42 pm »
I made this program a few years ago using Celtic3, but since BASIC is rather slow compared to assembly, I tried to port it to assembly... A year and a half ago, that attempt failed. However, yesterday on IRC when I stumbled across the project in my backups, I thought "I have the experience, now, let me give this a shot. I guess experience helps because I got it to work in a few hours of coding :)

Contained are two programs. One of them uses a compression method I came up with and the other decompresses.
Limitations are that only 46 characters are recognised (in this version).
Outputs are a compression that is at best 50% and at worst no compression. Average is just under 60%.

The program inputs are through Ans in both cases. Outputs are the same in both cases, too. Str1 contains the converted string and Ans contains the compression ratio.

If you have any questions, feel free to ask. My future plan is to make it adaptable (the Celtic3 version let the user create a key file whereas this version has a built in key).

Also, if I were to combine these programs both into one program, I could save a lot of memory as both contain similar code and data (such as the key file). My only issue is trying to find a way of input to determine if the string is to be compressed or decompressed. Maybe I can have the input and output string in Ans and the method to use in Theta and the output compression ratio in Theta...

In any event, I am not done with this program...