Wrapper function for Data.Binary.encode. Our package works with lists of
Word8 so this is a convenient helper function that does the conversion for
you.
It is not efficient, but this module is not designed for large amounts of
memory
transfers anyway.