Skip to content
LimniFS

.spec · wire-format · §3

Drop store.

Layer 1 — the bulk bytes. Slabs are the unit of locator addressing; drops are the atoms of storage and identity. Solid windows let drops share a codec stream for better ratio. Optional Reed-Solomon shards add availability insurance.

SLAB4–64 MiB§3.2 SLABHEADER (FIXED)‘LIM1’ magic · version · SlabId · length · ec_descriptor · crypto_hint≈ 60 bytes§3.3 DROP RECORDSdrop 0id: 32 Blen: u32rep: 3 Boff: u32drop 1id: 32 Blen: u32rep: 3 Boff: u32drop 2id: 32 Blen: u32rep: 3 Boff: u32drop 3id: 32 Blen: u32rep: 3 Boff: u32drop 4id: 32 Blen: u32rep: 3 Boff: u32≈ 47 B per drop§3.4 SOLID WINDOWS (CODEC OUTPUT)consecutive drops compressed as one stream (per §20.1)SOLID WINDOW 0codec: lz4drops 0, 1, 2decompressed once,indexed by offsetSOLID WINDOW 1codec: storedrops 3, 4no compression;just concatenated§3.5 EC SHARDS (OPTIONAL)k+m Reed-Solomon over GF(2^8) — only fetched when < k data shards availableavailability insurance, not integrity (BLAKE3 verifies integrity)

A slab is header + drop records + solid windows + optional EC shards. Total: 4–64 MiB.

§3.1 — Slab format

A slab is a contiguous byte object in the drop store. It is the unit of locator addressing for Layer 1. Slabs MUST be between 4 MiB and 64 MiB inclusive unless the manifest’s parameters section overrides. Slabs MUST NOT span locator entries — one slab maps to one primary locator plus optional mirror entries.

§3.2 — SlabHeader

The slab header is a fixed-size prefix at offset 0. Layout (every field exact-width):

FieldTypeNotes
magic4 bytesLIM1 (0x4C 0x49 0x4D 0x31)
format_versionu16 LEbump-incompatible layout changes
slab_idSlabId (40 B)§2.2 — ordinal + content hash
total_lengthu64 LEbytes including header
ec_descriptoru80 = no EC; 1..N = EC id; 255 = extended (post-v1)
crypto_hintu80 = plaintext; N = AEAD id (key lives in manifest §5.5)

§3.3 — Drop records

Each drop within a slab has a DropRecord describing where its bytes live:

FieldTypeNotes
drop_idDropId (32 B)§1.1
plaintext_lenu32 LEafter codec/AEAD inverse; reader sizes destination buffer
representation3 bytes§2.2 (codec, aead, ec); 0 = none allowed for plaintext
solid_window_indexu8which window contains this drop’s bytes
offset_in_windowu32 LEbyte offset within the decompressed solid window
len_in_windowu32 LEbyte length within the decompressed solid window

§3.4 — Solid windows

Per §20.1: per-slab solid windows only (cross-slab class groups deferred to solid-blocks-v2 feature flag). When codec = 0 (store), the window’s bytes are the literal concatenation of drop plaintexts, no framing. When codec != 0, the window is compressed; readers decompress once per window and index by (offset_in_window, len_in_window).

§3.5 — EC shards (optional)

When ec_descriptor != 0 and != 255, the slab’s last m blocks of size ceil(|payload| / k) are Reed-Solomon parity shards (k+m total). See §16 for the exact shard field layout and reconstruction procedure.