encoder
Converts an object into the values that componentSchemas encode.
The returned list must have one element per schema, each compatible with its schema. It must return the same components for the same object.
The writer calls this twice per logged value, once to size the output and once to encode it. Keep it to field reads and arithmetic, because anything expensive runs twice.