# Serialization

> Payloads are arbitrary objects, so save and load take a codec that encodes each value into its own slice and back.

8122c932

### Saving & Loading

Payloads are arbitrary objects, so `save` and `load` take a codec that encodes each value into its own slice and back:

- `storage_requirements(value)` sizes one value’s slice.
- `save(value, output)` encodes it.
- `load(input, value)` decodes it into a pre-constructed record.

`save` fills five caller-placed columns sized from `columns_extents`, while searches keep running, and `load` reads them back into an empty index, publishing everything at once.
