-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Source#readZip() #1462
Comments
Unfortunately the thing we need to read a zip FileSystem isn’t a Source (streaming) but rather a FileHandle (random access). |
That makes sense. Does |
ZipInputStream reads valid entries from the beginning of the stream through to the end. Only once at the end do you reach the central index and can realize that some of the entities you saw were not in the directory and thus were old/fake/malicious. |
Still worth doing, in my opinion, as it has its uses too. Just gotta put a big caveat. |
Is this a drawback of having layered The reason I mention this is because looking at Or alternatively, |
Counterpart of what I wrote here #1442 (comment)
When the user is choosing for instance on Android from the file picker a file, I can get an
InputStream
quite easily. Which I can also callsource()
on but from there I don't get an easy way of reading it as a zip file. I could as a workaround write it to a file and then callopenZip()
but I think it's beneficial to have areadZip()
directly on aSource
so that any source is readable as a Zip.The text was updated successfully, but these errors were encountered: