Skip to content

Conversation

@LossyDragon
Copy link
Collaborator

@LossyDragon LossyDragon commented Oct 13, 2025

Description

This PR completely redoes the ContentDownloader feature for JavaSteam.

Notables changes:

  • Separate feature as a child dependency (javasteam-depotdownloader)
  • Aligns with SteamKit's DepotDownloader in terms of features.
  • SampleDownloadApp sample reworked to show how to use DepotDownloader
  • Partial implementation for remote client control and peer to peer.
  • Support Android constraints for downloading.

Drafting this for now to let some Android related projects try it out and report any issues before finalizing.

Checklist

  • Code compiles correctly
  • All tests passing
  • Samples run successfully
  • Extended the README / documentation, if necessary

Utkarsh Dalal and others added 19 commits December 22, 2025 21:46
…mContent. Update ProtoParser to support webui protobufs. All in hopes to being p2p downloads to depot downloader.
Refactors depot downloading to use separate coroutines for network chunk processing and file writing, improving concurrency and overall download speed.

This change introduces dedicated coroutine workers for network chunk downloads and file writing, managing these tasks in parallel. It also ensures proper cleanup and channel closing, preventing resource leaks and ensuring all workers complete their tasks before the download is considered finished. Additionally, it improves the handling of last depot scenarios.
Migrates from Channels to Flows for chunk processing to
improve concurrency and simplify data flow management.

This change introduces dedicated flows for decompression and
file writing, enabling better control over resource utilization
and error handling. It also decouples network I/O from
decompression and writing operations by processing in parallel,
preventing potential bottlenecks.

Increases chunk processing throughput and reduces latency
by better utilizing available CPU cores.
Refines exception handling for chunk downloads in the CDN client.

Adjusts the logic to validate destination buffer size based on whether a depot key is provided.
Imports the necessary Kotlin flow operators for the
'DepotDownloader' class to resolve compilation errors
and ensure proper data stream processing.
Changes the dispatcher used for the download task to IO.

This ensures that download tasks, which are I/O bound,
run on a dispatcher that is optimized for I/O operations,
preventing potential blocking of the default dispatcher.
Ensures that the downloader is cancelled when its parent job is cancelled, allowing for better control and resource management in complex workflows.
@LossyDragon LossyDragon marked this pull request as ready for review December 24, 2025 15:30
@LossyDragon LossyDragon merged commit 7ead3b7 into Longi94:master Dec 24, 2025
1 check passed
@LossyDragon LossyDragon deleted the cd-rev4 branch December 24, 2025 16:00
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.

2 participants