Multi-Mirror Chunk Scheduling
Splits a single file across mirrors using Policy.fastestFirst() (EMA throughput vs. in-flight load) or Policy.weighted().
Zero-dependency pure Java 8 core compatible with Android minSdk 21—parallel multi-mirror chunking, failover, resumable state, and per-chunk SHA-256 verification, plus an optional standalone aria2 JNI backend.
What Anabranch Core Delivers
AGPL-3.0-only source files (no android.*, compatible with Android minSdk 21 without desugaring) offering Policy.fastestFirst()/weighted(), .part + .meta v2 resume, and per-chunk SHA-256 verification.60s failure budget without penalizing healthy slow transfers, supporting custom Engine, Policy, and Source.Resolver.aria2 AAR: Separate anabranch-aria2 artifact enables drop-in Aria2Downloader switching without exposing pure Java users to GPL requirements.Explicit Non-Goals & Hard Boundaries
Source.maxChunks is currently metadata-only; Aria2Downloader serializes globally under BUSY without Core Policy; Maven Central publication is manual (verify live coordinates before release use).Downloader dl = Downloader.newBuilder()
.defaultChunks(8)
.maxConcurrent(4)
.chunkRetryBudgetMs(60_000)
.build();
SourceSet sources = new SourceSet(Arrays.asList(
Source.ofBase("cdn-a", "https://cdn-a.example.test/pkg/"),
Source.ofBase("cdn-b", "https://cdn-b.example.test/pkg/")),
Policy.fastestFirst());
Result res = dl.download(
new Request("app.bin", new File("out/app.bin"), integrity, 8, true),
sources, Listener.NONE, Cancellation.NONE);Quick Navigation by Role & Goal
anabranch-core vs anabranch-aria2, check coordinates, and run tools/run-checks.sh;minSdk 21 no-desugaring rules, NDK/host aria2 builds, and troubleshooting;Engine (e.g., OkHttp), Policy, and Source.Resolver;