Manic

Crates.io Crates.io Tests

Crates.io dependency status

Fast and simple multithread downloads

Provides easy to use functions to download a file using multiple async or threaded connections while taking care to preserve integrity of the file and check it against a checksum.

Feature flags

Crate usage

Examples

Async example

```rust use manic::Downloader;

[tokio::main]

async fn main() -> Result<(), manic::ManicError> { let workers: u8 = 5; let client = Downloader::new("https://crates.io", workers).await?; let _ = client.download().await?; Ok(()) } ```

Multithread example

```rust use manic::threaded::Downloader;

fn main() -> Result<(), manic::ManicError> { let workers: u8 = 5; let client = Downloader::new("https://crates.io", workers)?; let _ = client.download()?; Ok(()) } ```

License: MIT OR Apache-2.0