Base64


Compress a String into Base64

This compression method is very helpful If you have a long string or any kind of byte array that you want to compress and then be able to put in a database or, for example, if you have a game with a level editor and you want to allow people to share levels with a code that you provide, hiding the actual variables you are using in that code and at the same time compressing it. Last year I have stumbled upon a SWC named Blooddy Crypto, it contains a wide variety of compressor and serialization, but most important, it’s fast as hell!  Download it and add it to your project. An example of code that show how to compress and uncompress:

It actually works better for longer strings, for example in this… [Read more »]