abstract fun encode(buffer: WriteBuffer, value: T) Encodes value to buffer at the current position.
Encodes value to buffer with runtime context.
Override this to read typed keys from the context (compression level, format version, etc.). The default implementation ignores the context and delegates to encode.