If I do not compress a plain text file on Android, will it be compressed in the APK?

I am discussing with myself whether it is necessary to compress a simple text file, which I include in my application, which is about 1.5 MB. I can compress it to 400 thousand. Using zip and unzip it in the application, but this is another thing that you can contact. If I do not, will it still be compressed in the APK? Is there any special place that I could make this happen? I'm really interested in the size of the download.

+4
source share
1 answer

Files are compressed based on their extension:

/* these formats are already compressed, or don't compress well */ static const char* kNoCompressExt[] = { ".jpg", ".jpeg", ".png", ".gif", ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet", ".rtttl", ".imy", ".xmf", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".amr", ".awb", ".wma", ".wmv" }; 

A source

If this is not one of them, it will be compressed when building apk.

+7
source

Source: https://habr.com/ru/post/908521/


All Articles