same-content 0.2.0

Determine whether data from different sources are the same.
Documentation
Same Content
====================

[![CI](https://github.com/magiclen/same-content/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/same-content/actions/workflows/ci.yml)

Determine whether data from different sources are the same.

## Example

```rust
use std::fs::File;

use same_content::*;

assert!(!same_content_from_files(&mut File::open("tests/data/P1140310.jpg").unwrap(), &mut File::open("tests/data/P1140558.jpg").unwrap()).unwrap());
```

## Change the Buffer Size

The default buffer size for the comparison functions is 8192 bytes per stream. Use a `*_with_buffer_size` function to select a different size with a const generic argument.

For example, to change the buffer size to 4096 bytes,

```rust
use std::fs::File;

use same_content::*;

assert!(!same_content_from_files_with_buffer_size::<4096>(&mut File::open("tests/data/P1140310.jpg").unwrap(), &mut File::open("tests/data/P1140558.jpg").unwrap()).unwrap());
```

## Asynchronous APIs

You may want to use async APIs with your async runtime. This crate supports `tokio`, currently.

```toml
[dependencies.same-content]
version = "*"
features = ["tokio"]
```

After enabling the async feature, the async functions are available.

## Crates.io

https://crates.io/crates/same-content

## Documentation

https://docs.rs/same-content

## License

[MIT](LICENSE)