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

Add extraction of entry ranges #350

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

mickael-menu
Copy link

@mickael-menu mickael-menu commented Jan 24, 2025

Changes proposed in this PR

This implements the feature I suggested a few years ago here: #167

Basically, I need to extract only a portion of length n of a compressed file, at a particular offset i. The use case is serving the entry over an HTTP byte-range request, which should not be entirely loaded into memory.

In the case of stored entries, I simply forward the requested range without modification.

Tests performed

I'm already using this implementation in our toolkit (Readium). I can write unit tests or do modifications if you're interested in this feature @weichsel.

Further info for the reviewer

I implemented other features in our fork that I would love to get merged upstream, if that's of interest to you.

  • Isolated the data access layer behind a DataSource protocol, that we used to stream ZIP entries over HTTP without downloading them.
  • Made the APIs async.

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

Successfully merging this pull request may close these issues.

1 participant