Mark TODO move this into bijection-netty.  I think we're going to be reimplementing this one over and over.