Learn Labs
5. Encoding and Evolution

5.1 Encoding and decoding

Programs work with data in (at least) two representations:

Programs work with data in (at least) two representations:

encode · serialize · marshaldecode · parse · unmarshalin memoryobjects, structs, lists, trees — using pointersbyte sequenceself-contained and flat, e.g. a JSON documentThe two look quite different, because a pointer would make no sense to any other process.
Figure 5.1.1Encoding and decoding

⚠️ Terminology clash: serialization also means something completely different in transactions (Ch 8). The book uses "encoding" throughout to avoid overloading the word.

When you don't need it: when a database operates directly on compressed data loaded from disk (Ch 4 §7.6), and with zero-copy formats designed to be used both at runtime and on disk/network without an explicit conversion step — Cap'n Proto and FlatBuffers.