Encode package:binary

Encode a value using binary serialisation to a lazy ByteString.
Lazily serialise a value to a file. This is just a convenience function, it's defined simply as:
encodeFile f = B.writeFile f . encode
So for example if you wanted to compress as well, you could use:
B.writeFile f . compress . encode