# guts-storage
Content-addressed storage for Git objects in the Guts platform.
## Overview
This crate provides storage backends for Git objects (blobs, trees, commits):
- **Memory backend** - In-memory storage for testing
- **RocksDB backend** - Persistent storage with LRU caching
## Features
- Content-addressed storage (SHA-1 based)
- Automatic deduplication
- Optional persistent storage with RocksDB
- LRU cache for frequently accessed objects
## Usage
```rust
use guts_storage::{Storage, MemoryStorage, GitObject};
// Create in-memory storage
let storage = MemoryStorage::new();
// Store and retrieve objects
let id = storage.store_blob(b"Hello, world!")?;
let blob = storage.get_object(&id)?;
```
## Features Flags
- `memory` (default) - In-memory storage backend
- `rocksdb-backend` - RocksDB persistent storage
- `full` - All features
## Part of Guts
This crate is part of [Guts](https://github.com/AbdelStark/guts), a decentralized, censorship-resistant alternative to GitHub built on BFT consensus.
## License
MIT OR Apache-2.0