1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # chunkrs
//!
//! Streaming Content-Defined Chunking (CDC) for Rust.
//!
//! Transforms byte streams into content-defined chunks with optional BLAKE3 hashes.
//! Designed as a small, composable primitive for:
//!
//! - Delta synchronization
//! - Deduplication
//! - Backup systems
//! - Content-addressable storage
//!
//! ## Design Philosophy
//!
//! Narrow scope: **transform byte streams into chunks**. Does not manage:
//! - Files or file paths
//! - Concurrency or I/O
//! - Chunk persistence
//! - Storage devices
//!
//! ## Algorithm
//!
//! FastCDC: deterministic, adaptive, single-pass streaming with O(1) memory per chunk.
//!
//! ## Features
//!
//! - `hash-blake3` (default) - BLAKE3 cryptographic hashing
//!
//! # Quick Start
//!
//! ```
//! use chunkrs::{Chunker, ChunkConfig};
//! use bytes::Bytes;
//!
//! let mut chunker = Chunker::new(ChunkConfig::default());
//! let (chunks, _pending) = chunker.push(Bytes::from("hello world"));
//!
//! if let Some(final_chunk) = chunker.finish() {
//! println!("Final chunk: {} bytes", final_chunk.len());
//! }
//!
//! for chunk in chunks {
//! println!("Chunk: offset={:?}, len={}, hash={:?}",
//! chunk.offset, chunk.len(), chunk.hash);
//! }
//! ```
// Internal modules
// Public API (flat design)
pub use ;
pub use Chunker;
pub use ;
pub use ChunkError;