Multi Threaded Downloader
A browser based multi-threaded downloader implemented in vanilla JavaScript.
Fetches parts of a file using the HTTP Range header and downloads those pieces in parallel. When the pieces have all been downloaded, the original file is re-assembled and saved in the browser's Downloads folder.
- Sends HTTP HEAD request to get the file info
- Calculate number of ranges and setup
- Sends HTTP GET requests with "Range: bytes=start-end" header for each chunk
- Monitor the progress of each response stream
- Retry on fail or specific HTTP status codes (like 503 Service Unavailable)
- Concatenates each response stream (in order) into a final output stream
- Uses [StreamSaver.js](https://github.com/jimmywarting/StreamSaver.js) to simplify downloading the output stream.
- 100% client side JavaScript, no plug-ins or proxy required