mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-06-10 23:29:06 +02:00
15 lines
400 B
Kotlin
15 lines
400 B
Kotlin
package app.revanced.lib.zip
|
|
|
|
import app.revanced.lib.zip.structures.ZipEntry
|
|
|
|
object ZipAligner {
|
|
private const val DEFAULT_ALIGNMENT = 4
|
|
private const val LIBRARY_ALIGNMENT = 4096
|
|
|
|
val apkZipEntryAlignment = { entry: ZipEntry ->
|
|
if (entry.compression.toUInt() != 0u) null
|
|
else if (entry.fileName.endsWith(".so")) LIBRARY_ALIGNMENT
|
|
else DEFAULT_ALIGNMENT
|
|
}
|
|
}
|