srikanth-lingala / zip4j

A Java library for zip files and streams
Apache License 2.0
2k stars 307 forks source link

A question about zip in zip. #528

Closed ameue closed 6 months ago

ameue commented 6 months ago

I have an a.zip file that needs to be decompressed, and there is only one b. zip file in the a.zip file. I used the net. lingala. zip4j. ZipFile(). extractAll() method to decompress a.zip to D: \ . After decompressing, I obtained a compressed file of b. zip in D: \ . When using the same method to decompress b. zip, it prompts that Zip headers are not found Before decompressing a, use Windows tools to open a.zip and view the properties of b. zip. The compression platform is Unix, and the minimum required rar version for decompressing is 2.0/Deflate. After using zip4j to decompress q.zip and checking the properties of b. zip, the compression platform has changed to Windows NT, and the minimum required rar version for decompression has become unknown. May I ask what the reason is. Using zip4j-2.15.5. jar

net.lingala.zip4j.Zipfile zipFile = new net.lingala.zip4j.Zipfile(azipPath); UnzipParameters p = new UnzipParameters (); zipFile.extractAll(destinationPath, p);

How should I use it to properly decompress b. zip

ameue commented 6 months ago

I found that b. zip has been changed to a GZIP compressed file