There is no need for the out member here.  The buf contains the wire encoding which you can (and do) read from.