I'm debating with myself whether or not to compress a plain text file I'm including in my application that is about 1.5 MB. I can compress it to 400k with zip and开发者_Go百科 unzip it in the application, but that's just one more thing to mess with. If I don't do that, will it get compressed anyway in the APK? Is there a special place I could put it to make this happen? I'm really only concerned with download size.
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"
};
Source
If it's not one of those it will be compressed when building the apk.
精彩评论