added utilities for handling binary data

Ignore-this: 1d7853d8e329d92bc2be52f348cbea8b

I was able to program a transfer app with these utils

darcs-hash:20131121203428-c21fe-946866a73b67aa66db80759df51473e8ebed9216