如果我不COM preSS在Android的纯文本文件,这将是COM pressed在APK呢? [英] If I don't compress a plain text file in Android, will it be compressed in the APK anyway?

查看:148
本文介绍了如果我不COM preSS在Android的纯文本文件,这将是COM pressed在APK呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟自己辩论是否要COM preSS一个纯文本文件,我包括在我的应用程序,约为1.5 MB。我可以COM preSS到400K拉链并解压缩它的应用,但是这只是一件事乱用。如果我不这样做,它会得到COM $ P $的APK反正pssed?是否有一个特别的地方,我可以把它做到这一点?我真的只关注下载量。

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 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.

推荐答案

文件是COM pressed基于其扩展名:

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"
};

<一个href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=tools/aapt/Package.cpp#l24">Source

如果这不是那些构建APK时候就会COM pressed之一。

If it's not one of those it will be compressed when building the apk.

这篇关于如果我不COM preSS在Android的纯文本文件,这将是COM pressed在APK呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆