Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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