4 ms·
When scanning backwards, when you find 0x504b0506 (EOCD signature), you can also check that the length of comment field (20 bytes ahead) is correct and the offs
by edflsafoiewq 5y ago
When scanning backwards, when you find 0x504b0506 (EOCD signature), you can also check that the length of comment field (20 bytes ahead) is correct and the offset to start of central directory (16 bytes ahead) points to the right signature to virtually eliminate the possibility of mistaking a spurious 0x504b0506 as the start of EOCD.
Not sure exactly how it works for ZIP64 but it should be similar.