EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: TheDewd on 20 September 2019, 23:20

Title: CRC Matching on Zip archives
Post by: TheDewd on 20 September 2019, 23:20
I know that the 7-ZIP DLL file can be used to check the crc32 value of the files within the compressed zip archive.

My question is when you have ROMs that require a header skipper (No-Intro NES), are the Roms being extracted during the scan? Must the ROMs be extracted to check the CRC value by skipping the first 16 bytes of the ROM file, or does it do the check inside the zip file without extraction?

Title: Re: CRC Matching on Zip archives
Post by: Roman on 21 September 2019, 12:34
Since all content inside the archive is compressed (unless you use a storage-only option), the rom with its header is compressed.

So yes, you need to extract the rom first to calculate the checksum over a particular piece of it. If you need the crc32 for the full compressed file, you can simply read it from the datastructures in the zip without any recalculation.
But if you need to calculate it, e.g. because you want to skip parts, you need to decompress it....but this is done multithreaded, blockwise to memory...and not to disk.
Title: Re: CRC Matching on Zip archives
Post by: TheDewd on 21 September 2019, 13:57
Thank you! I assumed it needed to be decompressed, but I never saw any indication that files were being written to disk. Since you've told me that it's being decompressed to RAM instead of disk, it makes sense now to me. :)
Title: Re: CRC Matching on Zip archives
Post by: Roman on 21 September 2019, 14:50
as long as RAM is available....but in these days that shouldn't be a problem