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: unzip a specific byte range #67

Open
zkrige opened this issue Feb 12, 2018 · 2 comments
Open

Feature Request: unzip a specific byte range #67

zkrige opened this issue Feb 12, 2018 · 2 comments

Comments

@zkrige
Copy link

zkrige commented Feb 12, 2018

I want to be able to extract a portion of a file in the zip archive. My specific use case is reading a video file from the zip, I only want to fetch specific chunks of data from the video file while playing the video

@gianlucabertani
Copy link
Owner

If you mean seeking to a specific file position and then read a chunk, with Objective-Zip this is not yet possible. It may be possible with the underlying MiniZip library.

What is possible now with Objective-Zip is buffered reading, i.e.: you don't need to extract the file as a whole, you can expand it in memory and consume it segment by segment. Check out this section of the README for an example.

@zkrige
Copy link
Author

zkrige commented Feb 13, 2018

Yeh, I currently expand in memory and pass the data back as needed. But at the moment I have to start at 0 for any given file in the zip. It would be nice to be able to read a chunk from a file in the zip and return that. I'll take a look at whats required and see if i can implement it. I might do a PR

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

2 participants