read stream of keys and values