should set `buf->data = ret->size = ret->asize = 0`