Does anyone have any BASIC string compressors/decompressors? I really need one for my contest entry, or it is going to end up using way too much space. I researched some algorithms and know how to implement them, I'm just not sure any of them would be as good or effective as y'all's. For reference, I store my strings a separate program like this:

If M=1:"<A_260_char_string>
If M=2:"<Another_260_char_string>
If M=3:"<A_3rd_260_char_string>

There was a competition in 2016 for who could come up with the best string compression based on speed and compression ratio. Here are some solutions.

I wasn't able to find the PT_'s solution which seems to have been wiped off the face of the forum. I can't speak for the others but you can use my code if you want. It didn't win the contest though Laughing

Edit: I don't know if the rules of the new contest allow stealing code. You should make sure it isn't against the rules.
Sorry for replying late, I'm not really sure why I did that...
I will probably use your compressor, as it is the only true "compression," and works with what I need. earthnite+jonbush's solution only removed the spaces, which would not work for me, and lirtosiast's solution wasn't really compression at all (at least not what I needed). Thanks for the help!
P.S. Got a decompressor to go along with it? If not oh well, I'll just do it myself :ℙ
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum