optimize rbuffer interface