Search code examples
android7ziplzmalz4

Why doesnt Android compress its APK's with LZ4 / LZMA?


I have been doing some testing on our Unity game and it seems like we could compress the game to half its size if the APK was compressed with LZ4 instead of Zlib.

Is there a reason why Android doesnt use LZ4?

I think that iOS uses it as its roughly the same size when compressed using LZ4.


Solution

  • I think the simplest answer is that they haven't needed to. While LZ4 is pretty impressive, I think the Android team in order to maintain backward compatibility with older devices has chosen to leave it be. Android originally went w/ Zlib back in 2005 since they were looking for a compression algo that was widely used and didn't have any patent or license restrictions on them. That was about six years prior, to the release of LZ4 in 2011. LZMA has been around longer around 1998, has to why Android didn't use that we'll have to ask Andy Rubin himself.