· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
Object Store

Content-Addressable Storage
At the heart of Astral lies the Object Store, a content-addressable storage system that forms the foundation for all versioning operations. Understanding this layer helps you appreciate why Astral is both fast and reliable.
What is Content-Addressable Storage?
Instead of storing files by name, Astral stores everything by its cryptographic hash—a unique fingerprint derived from the content itself.
Key Properties
- Deterministic: Same content always produces the same hash
- Collision-resistant: Different content produces different hashes
- Fast: Blake3 hashes at ~14 GB/s
- Secure: Cryptographically strong hashing
Object Types
Astral stores three types of objects:
Raw file content. The actual bytes of your files, compressed and stored by hash.
Directory structure. Maps file names to blob hashes, creating the filesystem hierarchy.
A snapshot in time. Points to a tree and contains metadata (author, message, parent).
How It Works
Saving a File
When you save a file, Astral:
1. Reads the file content
2. Computes the Blake3 hash
3. If the hash exists → reuse (deduplication!)
4. If new → compress and store the blob
5. Update the tree to reference this blob
.asl/objects/ ├── 8f/ │ └── 2a1c3d4e5f6789... ← First 2 chars as directory ├── 4b/ │ └── 1d9e2a3b4c5678... └── 1a/ └── 2b3c4d5e6f7890...
Automatic Deduplication
If you have 100 copies of the same file across different commits, Astral stores it once:
# All these identical files share one blob
project-v1/config.json → 8f2a1c3d
project-v2/config.json → 8f2a1c3d (same hash = same blob)
project-v3/config.json → 8f2a1c3d (reused, not re-stored)
Blake3 Performance
Astral uses Blake3, a modern cryptographic hash function designed for speed:
Why Blake3?
- Parallel by design: Takes advantage of multi-core CPUs
- Secure: 256-bit security level
- Incremental: Can hash streaming data
- Versatile: Works as a general-purpose hash, MAC, and KDF
Inspecting Objects
Astral provides commands to inspect the object store:
# Show object type and content
asl cat-object 8f2a1c3d
# Show object type only
asl cat-object -t 8f2a1c3d
# Show object size
asl cat-object -s 8f2a1c3d
$ asl cat-object 8f2a1c3d Object Type: blob Size: 1,247 bytes Content: ─────────────────── Hello, World! This is my file content. ───────────────────
Implications
Understanding the object store explains many of Astral's behaviors:
Objects are never modified. A different hash means different content. History is append-only.
Every read verifies the hash. Corruption is detected immediately.
Deduplication means large repos with similar files stay compact.
Hash comparisons are instant. Checking if content exists is O(1).