The Android APK package is just a zip (thanks to them for just using zip and not changing the header so that it can be easily manipulated with standard tools).
I chose the list of games from this article :
Google's instant app tech now lets you try games before you buy
which is :
Clash Royale, Words With Friends 2, Bubble Witch 3 Saga, Final Fantasy XV: A New Empire, Mighty Battles and -- of course -- Solitaire
I discovered that "Mighty Battles" internally contains a large pre-compressed pak file. (it's named "content.mp3" but is not really an mp3, it's some sort of compressed archive. They use the mp3 extension to get the APK package system to store it without further zlib compression.) Because of that I exluded Might Battles from the test; it would be about the same size with every compressor, and is not reflective of how it should be compressed (their internal package should be uncompressed if we're testing how well the outer compressor does). Later I also saw that "Clash Royale" is also mostly pre-compressed content. Clash Royale has its content in ".sc" files that are opaque compressed data. I left it in the test set, but it should also have those files uncompressed for real use with an outer compressor. I wasn't sure which Solitaire to test; I chose the one by Zynga.
The "tar" is made by unpacking the APK zip and concatenating all the files together. I also applied PNGz0 to turn off zlib compression on any PNGs. I then tested various compressors on the game tars.
| original | tar | zlib | Leviathan | |
| BubbleWitch3 | 78,032,875 | 304,736,621 | 67,311,666 | 54,443,823 |
| ClashRoyale | 101,702,690 | 124,031,098 | 98,386,824 | 93,026,161 |
| FinalFantasyXV | 58,933,554 | 144,668,500 | 57,104,802 | 41,093,459 |
| Solitaire | 14,814,888 | 139,177,140 | 14,071,999 | 8,337,863 |
| WordsWithFriends2 | 78,992,339 | 570,621,614 | 78,784,623 | 53,413,494 |
| total | 332,476,346 | 1,283,234,973 | 315,659,914 | 250,314,800 |
original = size of the source APK (per-file zip with some files stored uncompressed) tar = unzipped files, with PNGz0, concatenated together zlib = zip -9 applied to the tar ; slightly smaller than original Leviathan = Oodle Leviathan level 8 (Optimal4) applied to the tarYou can see that Clash Royale doesn't change much because it contains large amounts of pre-compressed data internally. The other games all get much smaller with Leviathan on a tar (relative to the original APK, or zlib on the tar). eg. BubbleWitch3 was 78 MB, Leviathan can send it in 54.4 MB ; Solitaire can be sent in almost half the size.
Leviathan is very fast to decode on ARM. Despite getting much more compression than zlib, it is faster to decode. More modern competitors (ZStd, brotli, LZMA) are also slower to decode than Leviathan on ARM, and get less compression.
For reference, here is the performance on this test set of a few compressors (speeds on Windows x64 Core i7-3770) :
|
|
|
Note that some of the wins here are not accessible to game developers. When a mobile game developer uses Oodle on Android, they can apply Oodle to their own content and get the size and time savings there. But they can't apply Oodle to their executable or Java files. The smaller they reduce their content, the larger the proportion of their APK becomes that is made up of files they can't compress. To compress all the content in the APK (both system and client files, as well as cross-file tar compression) requires support from the OS or transport layer.
I'll also take this chance to remind clients that when using Oodle, you should always try to turn off any previous compression on your data. For example, here we didn't just try the compressors directly on the APK files (which are zip archives and have previous zlib compression), we first unpacked them. We then further took the zlib compression off the PNG's so that the outer compressors in the test could have a chance to compress that data better. The internal compressors used on Clash Royale and Mighty Battles should also have been ideally turned off to maximize compression. On the other hand, turning off previous compression does not apply to data-specific lossy compressors such as audio, image, and video codecs. That type of data should be passed through with no further compression.