QuakeInjector icon indicating copy to clipboard operation
QuakeInjector copied to clipboard

Couldn't open file! invalid compression method

Open SpiritQuaddicted opened this issue 3 years ago • 4 comments

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

SpiritQuaddicted avatar Oct 26 '22 09:10 SpiritQuaddicted

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.

SpiritQuaddicted avatar Oct 26 '22 09:10 SpiritQuaddicted

Yeah, file is wrong. unzip -v 1qbj_1.05.zip shows that files a compressed with "Def64N".

SpiritQuaddicted avatar Oct 26 '22 09:10 SpiritQuaddicted

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.

neogeographica avatar Oct 26 '22 15:10 neogeographica

Argh... :(

https://stackoverflow.com/questions/34299045/java-compression-library-to-support-deflate64 suggests using https://commons.apache.org/proper/commons-compress/

SpiritQuaddicted avatar Oct 26 '22 16:10 SpiritQuaddicted

dtintin_fixed.zip is another one.

SpiritQuaddicted avatar Feb 16 '25 13:02 SpiritQuaddicted

Fixed: https://github.com/johnnycz/QuakeInjector/tree/issue-146-invalid-compression-method

johnnycz avatar May 22 '25 19:05 johnnycz

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!

SpiritQuaddicted avatar Jul 21 '25 19:07 SpiritQuaddicted

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.

johnnycz avatar Jul 21 '25 19:07 johnnycz

I know this project is old but I think it's worth releasing the fix as the issue persists.

xxvertigoxx avatar Sep 29 '25 22:09 xxvertigoxx

https://discuss.quaddicted.com/t/quake-injector-version-8-release-candidate-2/8138

SpiritQuaddicted avatar Sep 30 '25 06:09 SpiritQuaddicted