Expand description
§Bytehaul
An async HTTP download library with multi-connection acceleration, automatic resume, rate limiting, and checksum verification.
§Quick Start
use bytehaul::{Downloader, DownloadSpec};
let downloader = Downloader::builder().build()?;
let spec = DownloadSpec::new("https://example.com/file.bin")
.output_path("/tmp/file.bin")
.max_connections(8);
let handle = downloader.download(spec);
handle.wait().await?;§Features
- Multi-connection downloads – splits large files into pieces and fetches them in parallel using HTTP Range requests.
- Automatic resume – persists download progress to a control file so interrupted downloads can continue where they left off.
- Rate limiting – configurable per-download speed cap via a token-bucket rate limiter.
- Checksum verification – optional post-download integrity check with SHA-256, SHA-512, SHA-1, or MD5.
- Progress monitoring – real-time progress snapshots with speed and ETA, available via polling, watch channel, or callback.
- Proxy & custom DNS – supports HTTP/HTTPS proxies and custom DNS / DNS-over-HTTPS resolvers.
Structs§
- Download
Handle - Handle to a running download task.
- Download
Spec - Specification for a download task.
- Downloader
- Top-level downloader that manages shared resources (e.g. HTTP client).
- Downloader
Builder - Builder for
Downloader. - Progress
Snapshot - A point-in-time snapshot of download progress.
Enums§
- Checksum
- Checksum algorithm for post-download verification.
- Download
Error - Errors that can occur during a download.
- Download
State - Current state of a download task.
- File
Allocation - File allocation strategy.
- LogLevel
- Log verbosity level for download tasks.