Android APK Compression

Amar_BaitAmar_Bait DZMember ✭✭✭✭✭

Quick question: why does Xamarin APKs (which are zip files after all) not use "Best/Maximum" zip compression setting? Because when I zip an APK I nearly get a 50% lesser in size file... which shouldnt happen if the APK is well compressed.

Also "Embed native library" generates approx 50% less size (same as if I zipped an APK with no embed), does "Embed native" uses the "Best" compression setting?

Posts

  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭

    Bump.

  • CheesebaronCheesebaron DKInsider, University mod

    You can use ZipAlign to increase the compression level on an APK.

    First confirm that it has not been ZipAligned:

    zipalign -c -v 4 myapp.apk

    If it has not been ZipAligned do:

    zipalign -f -v 4 myapp.apk myapp-zipaligned.apk

  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭

    Thanks @Cheesebaron for the answer. But I think Publish builds (using Archive command in XS/Publish in VS) are already signed and zip-aligned and I still see a very bad compression ratio.

Sign In or Register to comment.