The message serialization is taken care of by WireMessage
operations, especially messagePut and messageGet. The
MessageAPI provides the useful polymorphic getVal and isSet
where getVal looks up default values and also works with extension
keys. The Utf8 newtype is used to indicate the format in the
underlying lazy ByteString. Messages and values can be combined
with the right-biased Mergeable operations. The mergeEmpty should
not be used as required values are filled in with undefined errors,
please use defaultValue instead.

The Utf8 type is a newtype of the Lazy ByteString. It can be safely
constructed by checking for errors with toUtf8, which returns 'Left
Int' indicating the index where an error is detected. It can be
deconstructed with utf8.