ar
ar copied to clipboard
When given a ReaderAt, support returning a SectionReader
Returning []byte
s means that tools using this library need to have enough memory available to store the data they're reading, even if the algorithms they're applying to that data would work just as well on a stream with constant memory requirements.
It would be helpful to be able to retrieve not just a file's contents, but a SectionReader that would let those contents be read directly from the underlying storage at a later time, when a seekable backing store is available.
I'm willing to do the work to implement this myself; this issue is provided as a vehicle for discussion, to ensure that the concept is acceptable before I go writing code.