-
Notifications
You must be signed in to change notification settings - Fork 480
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
AbstractReader.Skip doesn't work for UsePostDataDescriptor zip streams #162
Comments
It might be related to the thing you just fixed but that was me skipping data start position. Anyway, if the descriptor doesn't put in a compressed size I don't know how I can just skip it without decompressing. It's possible to scan the bytes for a zip header but that doesn't feel correct anyway. Already had issues with nested archives. |
I don't think you can skip it without decompressing, if the size isn't known. The problem is that it should not skip 0 bytes and assume it's skipped the contents, I think it has to use the fallback path of actually reading the contents (like it does for the |
OHH...I see. It thinks it should just skip 0 bytes. Yeah, you're right it should decompress it. Any chance of a PR for this issue? |
Simplest solution I can think of is to add to the
but that might be abusing the IsSolid property? I only saw it set for Rars, and only consumed in the Skip() method so this would probably be OK, but it smells a bit. Could rename the property to Or alternatively you could assume that if |
I guess where IsSolid is being checked should also check for the flag header and a size of zero to trigger the decompression |
Unfortunately that's in AbstractReader, and therefore doesn't have access to the ZipEntry Header - it shouldn't, in principle, have knowledge of zip-specific flags. |
In
AbstractReader.Skip()
the shortcut to skip data by reading the raw stream rather than decompressing doesn't work if.CompressedSize
is 0 due to a UsePostDataDescriptor formatted zip entry header.The text was updated successfully, but these errors were encountered: