Skip to main content

Crate hd_cas

Crate hd_cas 

Source
Expand description

§hd-cas

Content-addressable store for hyperdocker.

This crate provides a BLAKE3-hashed, content-defined chunked storage system. Files are split into variable-size chunks using FastCDC, hashed with BLAKE3, and stored with optional zstd compression. Identical content is automatically deduplicated across environments.

§Key Types

§Example

use hd_cas::{ContentStore, ContentHash};
use std::path::Path;

let store = ContentStore::open(Path::new("/tmp/cas")).unwrap();
let hash = store.put_file(Path::new("myfile.txt")).unwrap();
store.get_file(&hash, Path::new("recovered.txt")).unwrap();

Re-exports§

pub use hash::ContentHash;
pub use manifest::Manifest;
pub use store::ContentStore;
pub use gc::GarbageCollector;
pub use gc::GcStats;

Modules§

chunk
gc
hash
manifest
store