Description
Multiplatform Source
s and Sink
s are already great features, but it would also be nice to have random-access capabilities like Okio's FileHandle
class. The BufferView
option discussed in #225 would help in some cases, but in other cases it's impractical to load the entire file into memory to get at a small part of it—reading a few individual files from an archive, for example. As far as I know the only way to do this right now is to create a new Source
and skip to the specified offset, which isn't particularly convenient. (In fact, if I'm reading the code correctly, the skip
function does read everything up until that point into a buffer temporarily? Which would make it a no-go for those usecases as well.)
(I've tried to search both the repo and Slack to make sure there wasn't existing discussion about this, but if I've missed something please point me to it!)