1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # Bytehaul
//!
//! An async HTTP download library with multi-connection acceleration,
//! automatic resume, rate limiting, and checksum verification.
//!
//! ## Quick Start
//!
//! ```no_run
//! # async fn example() -> Result<(), bytehaul::DownloadError> {
//! 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?;
//! # Ok(())
//! # }
//! ```
//!
//! ## 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/SOCKS proxies and
//! custom DNS / DNS-over-HTTPS resolvers.
pub use ;
pub use DownloadError;
pub use ;
pub use ;
/// Re-exports for benchmarking. Not part of the public API.