arvryna / blazer

concurrent file downloader
Apache License 2.0
16 stars 3 forks source link
concurrency downloader fast go golang wget-alternative

Blazer - Concurrent file downloader

A CLI tool to download files from anywhere concurrently using the power of go-routines written using stdlib without any dependencies.

Features

Install

3 different ways:

Usage

blazer -url=example.com/1.mp4 -t=10

Flags

blazer -h
Usage of blazer:
  -checksum string
        checksum SHA256(currently supported) to verify file
  -out string
        output path to store the downloaded file
  -t int
        Thread count - Number of concurrent downloads (default 10)
  -url string
        Valid URL to download
  -v    prints current version of blazer

Benchmarks

Name Size Blazer cURL Wget
Debian ISO 300 MB 1min 10 sec (25 threads) 2min 40 sec 3 min 10 sec
Windows-10 5.4 GB 20min 52sec (25 threads) 46min 52 sec 40 min 25 sec

Demo

asciicast

Usage examples:

FAQ

How blazer works ?

Blazer makes use of RFC7233 to identify the size of the resource to download, and then initiates partial downloads concurrently with the help of multiple go-routines, once all segements are downloaded, we finally merge all the individual segments into the final file. Number of segments = thread count passed as param to blazer CLI

How file resumption work ?

Roadmap: