Open ntop001 opened 10 years ago
I find some code snippet in ApkDecoder.java
ApkDecoder.java
JarFile jf = new JarFile(mApkFile.getAbsoluteFile()); JarEntry je = jf.getJarEntry("resources.arsc"); if (je != null) { int compression = je.getMethod(); mCompressResources = (compression != ZipEntry.STORED) && (compression == ZipEntry.DEFLATED); } jf.close();
as java define
public static final int DEFLATED Added in API level 1 Zip entry state: Deflated. Constant Value: 8 (0x00000008) public static final int STORED Added in API level 1 Zip entry state: Stored. Constant Value: 0 (0x00000000)
public static final int DEFLATED Added in API level 1 Zip entry state: Deflated. Constant Value: 8 (0x00000008)
public static final int STORED Added in API level 1 Zip entry state: Stored. Constant Value: 0 (0x00000000)
possible output for above logic
why not just use mCompressResources = (compression == ZipEntry.DEFLATED); which get the same result ?
mCompressResources = (compression == ZipEntry.DEFLATED);
Thanks. I've made the change: https://github.com/iBotPeaches/Apktool/commit/d5d03fe1e4ad4b4dcaad49323615cc0c6d40d870
I find some code snippet in
ApkDecoder.java
as java define
possible output for above logic
why not just use
mCompressResources = (compression == ZipEntry.DEFLATED);
which get the same result ?