Monthly Archives: February 2012

Air for Android – Blitting test on Motorola Xoom and Galaxy S 2

I have been trying different Android devices with Air for Android 3.1 and Blitting, I noticed the performance is very different on each of them, on my Galaxy S 2 it runs smooth but on Motorola Xoom lags very bad. I went on the Android Market and downloaded AirBench, it is an app that runs some tests on your phone and tells you the results. Some unrelated tests that stand out were these: Parse 145 KB XML file: Galaxy S 2 – 70ms Xoom – 150ms Allocate 8192 KB of Memory: Galaxy S 2 – 21ms Xoom – 36ms Write read and delete a 1024KB file: Galaxy S 2 – 64ms Xoom – 83ms   In my experiment I was running 30/30 FPS on GS2 and 16/30 FPS on Xoom, an impressive… [Read more »]

Motorola Xoom Android

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 »]