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

Seek trait support for RawReader/Stored files #175

Open
zumoshi opened this issue Feb 14, 2021 · 4 comments
Open

Seek trait support for RawReader/Stored files #175

zumoshi opened this issue Feb 14, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@zumoshi
Copy link

zumoshi commented Feb 14, 2021

As per zip-rs/zip-old#221, @Plecra said ZipFile itself won't receive seek trait but seek support is possible through RawReader or a checked version that could provide another type of reader for stored files (no encryption/compression) with seek.
Additionally, a method that just returns bounds (a tuple with first/last byte index of file) could be useful.

I had some issues with passing ZipFile through an UnwindSafe barrier. but a method that just returns a tuple of (u64,u64) for (start, end) of a zipfile inside archive can easily be passed then a normal file with limit could be used to read that part.

Thanks for your time.

@busstoptaktik
Copy link

That would definitely be very useful - I'm hoping to be able to use a zip archive as container format for large, files, kept uncompressed ("stored"), for direct, read-only access to individual bytes on disk.

So searching the zip-file by stored file's name and getting a tuple of (usize, usize) in return would be the key for me.

@zamazan4ik zamazan4ik added the enhancement New feature or request label Jan 23, 2022
@exFalso
Copy link
Contributor

exFalso commented May 2, 2023

Just noting that I'm picking this up in a fork as we need it. We also use zip without compression/encryption. Will submit a PR

@Pr0methean
Copy link
Member

This may be doable by translating https://github.com/madler/zlib/blob/develop/examples/zran.c to Rust.

@Pr0methean
Copy link
Member

This repo is no longer maintained. This is being addressed in the case of Stored files by #69.

@Pr0methean Pr0methean transferred this issue from zip-rs/zip-old Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants