zipper icon indicating copy to clipboard operation
zipper copied to clipboard

Expose more of minizip's info struct

Open Togtja opened this issue 3 years ago • 1 comments

Do you know if the CRC of the extracted zipfiles get checked when extracting using Minizip/Zipper to extract?

If it does not I think we should expose the CRC in the ZipEntry, and maybe create some functions that unzips and checks the CRC

Togtja avatar May 10 '21 11:05 Togtja

After digging into minizip and writing some test code. I figured out that minizip does test the CRC when unzipping. However, it throws a generic "UNZ_BADZIPFILE" error, meaning it can be hard to tell exactly why it failed.

I still belive that exposing the CRC, and potetially other minizip file info, like the CRC and Compression method, would be nice for those of us who want to do some more checking and validating. Maybe also version and flags from the minizip unz_file_info64 struct

(I have editied the Title to reflect this)

Togtja avatar May 11 '21 09:05 Togtja

@Togtja The CRC is used when zipping with passwords (even is EAS is enabled. (Why ?)). https://github.com/sebastiandev/zipper/blob/66b3f4ae0dc549605ee651cc4ac91fd8fbc72bbb/src/Zipper.cpp#L19

Lecrapouille avatar Sep 11 '22 01:09 Lecrapouille