EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: CRC Matching on Zip archives  (Read 3130 times)

TheDewd

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 77.0.3865.92 Chrome 77.0.3865.92
    • View Profile
CRC Matching on Zip archives
« 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?

« Last Edit: 20 September 2019, 23:22 by TheDewd »
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 113
  • Offline Offline
  • Posts: 3292
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 77.0.3865.90 Chrome 77.0.3865.90
    • View Profile
Re: CRC Matching on Zip archives
« Reply #1 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.
Logged

TheDewd

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
  • Operating System:
  • Linux Linux
  • Browser:
  • Chrome 77.0.3865.92 Chrome 77.0.3865.92
    • View Profile
Re: CRC Matching on Zip archives
« Reply #2 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. :)
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 113
  • Offline Offline
  • Posts: 3292
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 77.0.3865.90 Chrome 77.0.3865.90
    • View Profile
Re: CRC Matching on Zip archives
« Reply #3 on: 21 September 2019, 14:50 »

as long as RAM is available....but in these days that shouldn't be a problem
Logged
Pages: [1]   Go Up
 

Page created in 0.25 seconds with 19 queries.