zstd-jni 16 KB page-size fix: upgrade to 1.5.7-3
Artifact com.github.luben:zstd-jni · measured 2026-10-01 · all libraries
fixed
zstd-jni versions up to and including 1.5.7-2 that we measured ship 4 KB-aligned native libraries (offending for Google Play's 16 KB page-size requirement). The first measured aligned stable version is 1.5.7-3; the newest measured, 1.5.7-20, is aligned.
Per-major-line fixes
Different major versions have separate fix paths:
1.x: upgrade to1.5.7-3
- Non-monotone history. An aligned stable release exists before a later offending one (parallel release lines or backports). A higher version number does not guarantee alignment: pick your exact version and measure it. The version below is only the lowest aligned stable version above the highest offending one.
- NON-MONOTONE: an aligned release can be followed by an offending one; do not assume newer is safe. Per-release-line guidance: 1.x -> use measured aligned 1.5.7-3 (after offending 1.5.7-2). Re-run the checker on the version you resolve
- ARCHITECTURE-SPECIFIC: the last offending measurement 1.5.7-2 is x86_64-only; its arm64-v8a libraries are aligned
- Sampled, not exhaustive: 28 of 159 published versions were measured with native code; unmeasured versions in between are unknown.
Measured evidence
| Version | Library file | p_align | File date | Source | |
|---|---|---|---|---|---|
| Last offending | 1.5.7-2 | jni/x86_64/libzstd-jni-1.5.7-2.so | 4 KB (2^12) | Mon, 17 Mar 2025 05:00:22 GMT | artifact |
| First aligned | 1.5.7-3 | jni/arm64-v8a/libzstd-jni-1.5.7-3.so | 16 KB (2^14) | Sat, 03 May 2025 14:19:56 GMT | artifact |
p_align is the smallest PT_LOAD segment alignment of the ELF. 16 KB-compatible needs at least 16384 (2^14). Method: min PT_LOAD p_align of arm64-v8a/x86_64 .so inside the published AAR/JAR; aligned = >=16384 for every lib. Dates are repository file times, not official release dates.
Offending versions measured (15)
1.3.5-3, 1.3.8-2, 1.3.8-9, 1.4.4-3, 1.4.4-10, 1.4.5-5, 1.4.5-12, 1.4.8-4, 1.4.9-4, 1.5.1-1, 1.5.4-2, 1.5.5-7, 1.5.6-3, 1.5.6-9, 1.5.7-2
Native libraries seen: libzstd-jni-1.4.9-3.so, libzstd-jni-1.5.1-1.so, libzstd-jni-1.5.4-2.so, libzstd-jni-1.5.5-7.so, libzstd-jni-1.5.6-3.so, libzstd-jni-1.5.6-9.so, libzstd-jni-1.5.7-13.so, libzstd-jni-1.5.7-15.so, libzstd-jni-1.5.7-16.so, libzstd-jni-1.5.7-17.so, libzstd-jni-1.5.7-18.so, libzstd-jni-1.5.7-19.so and 8 more.
The Gradle change
implementation("com.github.luben:zstd-jni:1.5.7-3")an aligned version, lowest measured above the last offending one; newer measured versions are aligned too (latest 1.5.7-20). Check: ./gradlew :app:dependencyInsight --dependency zstd-jni --configuration releaseRuntimeClasspath // NON-MONOTONE: an aligned release can be followed by an offending one; do not assume newer is safe. Per-release-line guidance: 1.x -> use measured aligned 1.5.7-3 (after offending 1.5.7-2). Re-run the checker on the version you resolve // ARCHITECTURE-SPECIFIC: the last offending measurement 1.5.7-2 is x86_64-only; its arm64-v8a libraries are aligned
Confirm what Gradle actually resolves, since another dependency may pull an older version:
./gradlew :app:dependencyInsight --dependency zstd-jni --configuration releaseRuntimeClasspathRe-verify it yourself
Download the artifact and run the free checker (check16k.py, Python 3, no dependencies):
curl -LO https://repo1.maven.org/maven2/com/github/luben/zstd-jni/1.5.7-3/zstd-jni-1.5.7-3.aar
python3 check16k.py zstd-jni-1.5.7-3.aarExit 0 = aligned, 1 = an unaligned library found. Better still, run it on your final .aab/.apk.
The paid kit ($12, v2) contains the complete measured fix map for all 80+ libraries as JSON and a table, every raw per-version measurement, the spot-check evidence, and the step-by-step guide for Play's 16 KB requirement. This page and the checker script stay free.
Get the kit ($12)