Skip to content

libarchive based android luajit launcher #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented May 16, 2025

With libarchive supporting the 7z format, we can use it for decompressing assets on Android, instead of maintaining a different (more complicated and less maintainable) implementation.

This move out building all JNI libraries out of gradle.

Code size reduction: -14.2 KB on ARM, -27.5 KB on ARM64.

We also gain support for ZSTD during development, for example testing the ARM build on my old Nexus 7:

Method Compression Time Archive Size Decompression Time
-m0=lzma2 -mx=9 24.889 s 19 MiB 6.544 s
-m0=flzma2 -mx=9 6.831 s 19 MiB 6.582 s
-m0=zstd -mhc=off -mx=19 11.968 s 21 MiB 2.172 s
-m0=zstd -mhc=off -mx=16 4.188 s 22 MiB 2.104 s

This change is Reviewable

Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me. Pinging @pazos

@benoit-pierre benoit-pierre force-pushed the pr/libarchive_based_android-luajit-launcher branch from 2b4c079 to a66f0da Compare May 26, 2025 18:44
@benoit-pierre benoit-pierre marked this pull request as ready for review May 26, 2025 18:46
@Frenzie
Copy link
Member

Frenzie commented May 26, 2025

Oops, I didn't realize #2095 would conflict or I'd have merged this one first.

@benoit-pierre benoit-pierre force-pushed the pr/libarchive_based_android-luajit-launcher branch from a66f0da to 146642c Compare May 26, 2025 20:24
@Frenzie Frenzie merged commit ca3f8fc into koreader:master May 26, 2025
4 checks passed
@benoit-pierre benoit-pierre deleted the pr/libarchive_based_android-luajit-launcher branch May 26, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants