Skip to main content

Module cas_store

Module cas_store 

Source
Expand description

Content-addressable chunk store with crash-safe atomic writes. Content-addressable storage (CAS) directory for foxing replication targets.

Stores files as BLAKE3-addressed chunks in a sharded directory layout. Works on any filesystem (exFAT, FAT32, NTFS, NFS) – no xattrs, permissions, or symlinks required. All metadata is in the append-only manifest.

Layout:

.foxing_cas/
  config.json        --  store parameters (chunk sizes, compression)
  manifest.jsonl     --  append-only operation log (one JSON line per op)
  chunks/
    a1/b2c3d4...    --  chunk files named by BLAKE3 hash
    tmp/            --  staging area for crash-safe writes

Structs§

BatchStats
Statistics from a batched store operation (amortized fsync).
CasConfig
Store configuration (persisted as config.json).
CasStore
Content-addressable chunk store.
CasStoreStats
Statistics from a store_file operation.
CompactStats
Statistics from a compact operation.
DeltaStoreStats
Statistics from a delta store operation.
FileEntry
Current state of a file in the store (after replaying manifest).
FileMeta
File metadata stored in manifest entries.

Enums§

ManifestOp
A single operation in the manifest log.