po-devs/pokemon-online — pull request #249 by CrystalMoogle (2013-06-04 07:18:07+00:00)
Title: Adding functions to compress/uncompress data

Compresses data with writeCompressed then you can read it later with readCompressed as posted here: http://pokemon-online.eu/forums/showthread.php?20318-sys-writeCompressed-and-sys-readCompressed to help save on file sizes stored on servers/clients.

I tested it and it got a 18mb JSON file down to 800kb (!!!), with no loss of data after reading again. There is a small amount of lag, about a second pause (though probably longer with larger files), maybe level 9 compression is too high (possibly a way to define a level in an optional third parameter :o).