Skip to content
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

Feature Request: Multi-thread download of a single file using http range #65

Open
Yesterday17 opened this issue May 27, 2023 · 1 comment
Labels
kind/feature New feature request

Comments

@Yesterday17
Copy link

Feature request

Multi-thread download of a single file using http range.

Current Behavior

One http request is used to download the whole file.

Expected Behavior

Multiple requests can be used to speed up the download process.

Possible Solution

After getting the content length of a file, we can split it into multiple chunks. Then, we can spawn n downloaders to download those chunks. Finally, we can merge them into a whole file.

For resuming download, we need a separated file to track the whole download process like what aria2 does.

@Yesterday17 Yesterday17 added the kind/feature New feature request label May 27, 2023
@Yesterday17
Copy link
Author

A simple workaround is to add a range property to Download structure. Then users can HEAD the file themselves and split the whole file into multiple ranges. But it looks hacky 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

No branches or pull requests

1 participant