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
//! # casq Core
//!
//! A content-addressed file store (CAS) using BLAKE3 hashing.
//!
//! This library provides the core functionality for storing and retrieving files and
//! directories by their cryptographic hash. Objects are stored immutably with stable
//! content IDs, using a tree-based directory representation.
//!
//! ## Features
//!
//! - Content-addressed storage: files/dirs stored by hash
//! - Immutable objects with stable content IDs
//! - Tree-based directory representation
//! - Garbage collection for unreferenced objects
//! - Named references (refs) as GC roots
//!
//! ## Example
//!
//! ```no_run
//! use casq_core::{Store, Algorithm};
//! use std::path::Path;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Initialize a new store
//! let store = Store::init("./my-store", Algorithm::Blake3)?;
//!
//! // Add a file or directory
//! let hash = store.add_path(Path::new("./my-data"))?;
//!
//! // Create a reference to the root hash
//! store.refs().add("backup", &hash)?;
//!
//! // Garbage collect unreferenced objects
//! let stats = store.gc(false)?;
//! println!("Deleted {} objects", stats.objects_deleted);
//!
//! // Materialize back to filesystem
//! store.materialize(&hash, Path::new("./restored"))?;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use RefManager;
pub use Store;
pub use ;