Skip to content

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

@asinghvi17

Description

@asinghvi17

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions