A high-speed, multi-threaded file downloader built in Go, designed to split a file into multiple chunks and download them in parallel, boosting download performance significantly. It supports persistent pause/resume.
- Multi-threaded downloading using Goroutines
- File is split into byte-range chunks and downloaded in parallel
- Persistent pause/resume — interrupted downloads are resumed per-chunk from a sidecar state file, never from byte zero
- Progress bar — live completion bar with speed and ETA on stderr (in-place on a terminal, periodic lines when redirected)
- Automatic file assembly (via direct
WriteAt, no temp-file concatenation) - Simple CLI usage with distinct exit codes for scripting
- Go 1.24+
go build -o guzz ./cmd/guzzSingle file (non-interactive):
./guzz <url> <output_path> [-concurrency N] [-fresh] [-timeout D]Prefer flags (the positional thread count is kept for backward compatibility):
./guzz -concurrency 8 <url> <output_path>Progress is written to stderr: a single animated bar when stderr is a
terminal, periodic status lines when it is redirected, so stdout stays
clean for piping.
| Flag | Default | Description |
|---|---|---|
-concurrency / -c |
4 |
number of parallel download threads |
-timeout |
30s |
per-request idle/stall timeout (0 = default) |
-fresh |
false |
force a clean restart, ignoring saved resume state |
-force-resume |
false |
resume even if validation fails (you assume the risk) |
Guzz writes per-chunk progress to <output>.guzz-state.json. On re-invocation
against the same output path it auto-detects and resumes, re-fetching only
missing bytes. If the remote resource changed (ETag / Last-Modified /
Content-Length mismatch), it refuses by default — pass -fresh to restart
clean or -force-resume to resume anyway.
A completed download removes the sidecar file, leaving no state behind.
| Code | Meaning |
|---|---|
0 |
success |
1 |
generic failure |
2 |
usage error |
3 |
paused and resumable (interrupted via signal) |