Golang basic file downloader using Accept-Ranges for parallel downloads to download a file in efficient way with the help of concurrency.
If a URL supports http header - Accept-Ranges
, it will be divided into several parts and download it concurrently. Otherwise, the files will still be downloaded but not in parallel
go get -u github.com/cdhtlr/GoParallelDownload
- Gets head of http response
- Initializes go routines for partial downloads if range downloads are supported
- Run them simultaneously until all is Done
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -extldflags=-static" -a -o downloader.exe .
This program comes with no warranty. You must use this program at your own risk. This program slightly copies the source code from Raviraa Speedtest
- Using a large number of connections to a single URL can lead to DOS attacks.
- Performs memory efficiency without debug.FreeOSMemory()