A little refactoring of vector_read_stream_t