Couldn't open file! invalid compression method
Trying to install https://www.quaddicted.com/reviews/qbj_1.05.html the Injector fails to uncompress the ZIP archive and shows the user a message "Couldn't open file! invalid compression method".
No idea what might be wrong there. The file is "compressed" with "store" but I would assume that other files in the archive were using that "compression" already and I am not aware of issues.
https://www.quaddicted.com/filebase/qbj_1.05.zip
md5: 601bc9baa2b4226d101f16cb8cb45b65
ctsj2.zip: Zip archive data, at least v2.0 to extract, compression method=deflate
qbj_1.05.zip: Zip archive data, at least v2.0 to extract, compression method=store
I unpacked and packed it again with a simple "zip -r qbj_1.05.zip.zip qbj" and the resulting archive works fine.
However I noticed that my compressed version is about the same size (512MB) as the supposedly uncompressed "store" version (480MB). An actually uncompressed ZIP is at 1.5GB.
It seems like the compression method in the file's metadata might be mislabeled as "store" when it is actually compressed? Or something tripped off file and the information above is not actually true, with another problem.
Yeah, file is wrong. unzip -v 1qbj_1.05.zip shows that files a compressed with "Def64N".
Yeah I ran into this problem myself. It happens for large zipfiles but also apparently for smaller zipfiles that have been incrementally updated: https://github.com/neogeographica/quakestarter/issues/84
In my case I was using a .NET assembly to do the unzip but it looks like java.util.Zip has the same problem.
Just unzipping and rezipping fixes the issue if the contents are less than 2GB. Don't know of a better solution unfortunately... maybe the best one can do is just to check using unzip -v to catch the problem.
Argh... :(
https://stackoverflow.com/questions/34299045/java-compression-library-to-support-deflate64 suggests using https://commons.apache.org/proper/commons-compress/
dtintin_fixed.zip is another one.
Fixed: https://github.com/johnnycz/QuakeInjector/tree/issue-146-invalid-compression-method
Dang, I forgot about this. Would have been a nice addition to the alpha07.
Could you make a pull request so that we get it in alpha08?
Thanks a lot for fixing this!
Yeah, this is still on my radar. I think the alpha08 could be made of this + the repackaging support (once finished). Those two updates make sense together as they are the same theme - making more packages compatible.
I know this project is old but I think it's worth releasing the fix as the issue persists.
https://discuss.quaddicted.com/t/quake-injector-version-8-release-candidate-2/8138