首页 > 解决方案 > 为什么 Zipalign 无法正常处理 .pvr 文件?

问题描述

我在我的 Android 游戏中使用 .pvr 文件。但是当使用 Zipalign 压缩它时,.pvr 文件的大小没有变化(另一种类型的文件效果很好)

我尝试使用最新的 Zipalign 工具,更改标志

工具/windows/zipalign -v -f 4 C:_Working\Game.apk release_apk\Game.apk

标签: compressionapkzipalign

解决方案


The zipalign tool is not about compressing but about "aligning" elements in the zip file, which means moving them at a position in the zip file which is a multiple of bytes of the value you give (in this case 4 -- which means, every uncompressed element is located at an offset multiple of 4). Compression is completely orthogonal to zip-aligning.

Depending on what tool you use to build your APK, some build systems may keep some files uncompressed, so you should look at the documentation.

Another possibility is that the .pvr file is already compressed in itself so zipping it brings little gain in size.


推荐阅读