6 releases (breaking)

Uses new Rust 2024

new 0.6.0 May 4, 2025
0.5.0 May 4, 2025
0.4.0 Apr 13, 2025
0.3.0 Apr 13, 2025
0.1.0 Apr 12, 2025

#1652 in Network programming

Download history 218/week @ 2025-04-07 74/week @ 2025-04-14 4/week @ 2025-04-21 117/week @ 2025-04-28

417 downloads per month

MIT license

14KB
236 lines

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(
    0,
    "./uploads",
    "abcdefg",
    "test.txt",
    1,
    |file_id: &str, chunk_index: usize| format!("{file_id}.{chunk_index}"),
)
.unwrap();
chunk_strategy.save_chunk(b"test", 0).await.unwrap();
chunk_strategy.merge_chunks().await.unwrap();

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

~5–10MB
~87K SLoC