Does anyone know of a composite stream solution that will pre-load the first portion of a Stream in to a MemoryStream and keep the remainder as the original Stream which will be accessed when subsequent parts are required as necessary?
I should imagine some wrapper class would implement the Stream interface and transparently juggle the access between the two streams depending upon which part is accessed.
I'm hoping this is a solution someone may have solved before, maybe to optimize performance of reading a large FileStream.
In my case I'm trying to get around a Windows Phone 8 bug reading large files from the SD card. More detail of the issue I'm trying to circumnavigate is provided in this answer: https://stackoverflow.com/a/17355068/250254