Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] readbytes(path, start, stop) to efficiently read a byte range from a file #180

Open
asinghvi17 opened this issue Sep 2, 2024 · 0 comments

Comments

@asinghvi17
Copy link

Accessing chunked data often requires reading specific, pre-known byte ranges from a file.

S3 already supports this (AWSS3.jl has a keyword to read for this reason) and some HTTP implementations also support retrieving a certain range of bytes from the response.

The ideal function would have a generic implementation that looks like:

function readbytes(path, start, stop)
	open(f) do io
  	  seek(io, start)
 	  read(io, stop-start)
	end
end

and packages like AWSS3.jl could override if they have more efficient ways to perform this kind of access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant