How It Works
Text content over 10 KB is automatically gzip-compressed before writing to Shelby. Decompression is transparent on read.When Compression Applies
| Content | Compressed? | Why |
|---|---|---|
| Text > 10 KB | ✅ Yes | Significant space savings |
| Text ≤ 10 KB | ❌ No | Overhead not worth it |
| Binary files (uploads) | ❌ No | Already compressed (JPEG, MP4, etc.) |
| Encrypted content | ❌ No | Ciphertext doesn’t compress well |
Response Fields
sizeBytes— the actual size stored on-chain (after compression)isCompressed—trueif the content was compressed
Transparent Decompression
You don’t need to do anything special —GET /v1/memory/:id returns the original uncompressed content regardless of whether it was stored compressed.
