4 releases (breaking)
Uses new Rust 2024
new 0.4.0 | Apr 13, 2025 |
---|---|
0.3.0 | Apr 13, 2025 |
0.2.0 | Apr 12, 2025 |
0.1.0 | Apr 12, 2025 |
#1956 in Network programming
93 downloads per month
12KB
207 lines
chunkify
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: &str, 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.
Dependencies
~4.5–10MB
~87K SLoC