Level code compression

Level compression was originally created because of cookies' limited size. Levels could easily surpass the 4KB storage of cookies, and so the levelcode needed to be compressed if it was going to be stored in cookies for much longer.

Level code compression can save an average of around 45% of level data filesize through various methods of simplifying levelcode.

Methods

 * 1) The style is compressed into a single number if it is one of the default styles. If not, it is left alone.
 * 2) The horizontal boundary is passed through a Base 128 function (e.g. 45 would turn into I.). as well as the first 4 attributes of the tile data.
 * 3) If a tile attribute can be considered a "Number," it also gets compressed, but if it isn't, it doesn't compress.
 * 4) Next, the compression detects when tiles repeat on the X axis, if it detects this, it counts up to the amount of tiles that were repeated, and uses the first tile, followed by a "Ç," and then the length of the tiles.