mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-19 01:13:57 +00:00
* feat: remove extra zipalign step * remove zipfs * remove use * reduce compression * put back misc.xml * revert stupid autofix
12 lines
414 B
Kotlin
12 lines
414 B
Kotlin
package app.revanced.utils.signing.align
|
|
|
|
import app.revanced.utils.signing.align.zip.structures.ZipEntry
|
|
|
|
internal object ZipAligner {
|
|
private const val DEFAULT_ALIGNMENT = 4
|
|
private const val LIBRARY_ALIGNMENT = 4096
|
|
|
|
fun getEntryAlignment(entry: ZipEntry): Int? =
|
|
if (entry.compression.toUInt() != 0u) null else if (entry.fileName.endsWith(".so")) LIBRARY_ALIGNMENT else DEFAULT_ALIGNMENT
|
|
}
|