Factor out create_outbuf, creating an outbuf just given an inbuf