Streaming sequences should be able to have two buffers and switch between them more easily. That way if we are frequently reading/rewinding/peeking around the boundary of two buffers we will not need to frequently refill.
We would probably need to keep track of the start position of each buffer in some way, so we would know if the "next" buffer was the correct one to move to or if we needed to refill. A rewind could also check the buffer start location of both buffers to know which one to rewind to.
Streaming sequences should be able to have two buffers and switch between them more easily. That way if we are frequently reading/rewinding/peeking around the boundary of two buffers we will not need to frequently refill.
We would probably need to keep track of the start position of each buffer in some way, so we would know if the "next" buffer was the correct one to move to or if we needed to refill. A rewind could also check the buffer start location of both buffers to know which one to rewind to.