chunkify 0.1.0

A simple and efficient chunking library for Rust.
Documentation

chunkify

Official Documentation

Api Docs

A simple and efficient chunking library for Rust.

Installation

To use this crate, you can run cmd:

cargo add chunkify

Use

use chunkify::*;

let chunk_strategy: ChunkStrategy =
    ChunkStrategy::new("./uploads", |file_id: String, chunk_index: usize| {
        format!("{file_id}{chunk_index}")
    });
let res: ChunkStrategyResult = chunk_strategy
    .handle("test.txt", b"test", "abcdefg", 0, 10)
    .await;
match res {
    Ok(_) => {}
    Err(error) => {}
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Contact

For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.