# clawsync-core Low-level primitives for ClawSync: checksums, content-defined chunking, delta computation, and compression. ## Overview `clawsync-core` provides the performance-critical building blocks used by the higher-level ClawSync crates. All hot paths are Rayon-parallelized and target ≥10 GB/s BLAKE3 throughput on AVX2 hardware. ## Modules ### `checksum` - `blake3_hash(data)` — single-call BLAKE3 - `blake3_hash_large(data)` — Rayon tree hashing for inputs ≥128 KB (≥10 GiB/s) - `blake3_hash_batch(chunks)` — parallel batch hashing via `par_iter` - `blake3_hex(data)` / `hash_to_hex(hash)` — lookup-table hex encoding - `xxh3_hash(data)` — xxHash3 for fast block checksums ### `cdc` Content-defined chunking via `fastcdc`. Produces variable-length chunks with stable boundaries for efficient delta transfer. ### `delta` Parallel stripe delta computation (Rayon). Produces `Vec` from two byte slices. ### `compress` Streaming zstd and lz4 frame wrappers for block-level compression. ## Performance | Operation | Throughput | |---|---| | BLAKE3 single-threaded | ~3 GiB/s | | BLAKE3 Rayon (1 MB input) | ≥10 GiB/s | | BLAKE3 batch (256 × 4 KB) | ≥9 GiB/s | | xxHash3 | ≥20 GiB/s | Requires `RUSTFLAGS="-C target-cpu=native"` for full SIMD throughput (set in `.cargo/config.toml` of the workspace). ## License MIT — see repository root.