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
//! # Copia
//!
//! Pure Rust rsync-style synchronization for Sovereign AI.
//!
//! Copia implements the rsync delta-transfer algorithm in 100% safe Rust,
//! providing memory-safe, auditable, high-performance file synchronization.
//!
//! ## Features
//!
//! - **Rolling Checksum**: Adler-32 variant for O(1) window sliding
//! - **Strong Hash**: BLAKE3 for cryptographic block verification
//! - **Delta Encoding**: Efficient representation of file differences
//! - **Streaming**: O(1) memory for arbitrary file sizes
//!
//! ## Example
//!
//! ```rust
//! use copia::{SyncBuilder, Sync};
//! use std::io::Cursor;
//!
//! // Create sync engine with custom block size
//! let sync = SyncBuilder::new()
//! .block_size(2048)
//! .build();
//!
//! // Generate signature from basis file
//! let basis = b"original file content";
//! let signature = sync.signature(Cursor::new(basis.as_slice())).unwrap();
//!
//! // Compute delta from modified source
//! let source = b"modified file content";
//! let delta = sync.delta(Cursor::new(source.as_slice()), &signature).unwrap();
//!
//! // Apply delta to reconstruct
//! let mut output = Vec::new();
//! sync.patch(Cursor::new(basis.as_slice()), &delta, &mut output).unwrap();
//! assert_eq!(output, source);
//! ```
pub use ;
pub use ;
pub use ;
pub use StrongHash;
pub use ;
pub use ;
pub use ;