A type-class to convert to ByteString values and back