[RFC] fix -Wconversion warnings for rstream

I'd like to request comments for how we should handle these things in general. What do you guys think about the assert? How do you guys feel about `size_t` for these types (an unsigned type). Especially ping @tarruda who made the rstream class.