Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guzz

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.


Features

  • 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

Requirements

  • Go 1.24+

Build

go build -o guzz ./cmd/guzz

Usage

Single 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.

Flags

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)

Resume behavior

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.

Exit codes

Code Meaning
0 success
1 generic failure
2 usage error
3 paused and resumable (interrupted via signal)

About

An efficient multithreaded file downloader made in Golang, which splits up a single file into smaller parts, installs them parallely and joins them at the end.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages