Type-classes to convert values to and from ByteString.