Decodes typed messages from bytes.
Separated from Encoder so that receive-only streams can require only decoding capability. fun interface enables SAM lambda: Decoder<Int> { buffer -> buffer.readInt() }
fun interface
Decoder<Int> { buffer -> buffer.readInt() }
Decodes a value from buffer at the current position.