Archive guides

Inspect ZIP records and verify one member or all payloads

·

A ZIP central directory describes the entries. Check those records first, then check the actual stored or compressed data before trusting the contents.

ZIP File Inspector

Read the ZIP index for the example

Select Load example and Read ZIP index. The ZIP has three file entries, with zero payloads verified at this point. Select the first entry, routes/café.txt.

Compare the header and payload metadata. The flags are 0x0808, which include the UTF-8 name flag and the flag for a following data descriptor. The central directory starts at byte 215 in this sample.

Read the ZIP index for the example
Record or valueExample evidence
Local header offset0
Compressed payload offset46
MethodDeflate, method 8
Compressed → expanded bytes14 → 12
Declared CRC-3258252F19

PKWARE APPNOTE 6.3.10, ZIP file format

Verify the first member’s bytes and CRC

Select Verify selected entry. The report now shows one verified payload. The observed size is 12 bytes and the observed CRC-32 is 58252F19.

Verify all files to expand all three payloads and check their individual lengths and CRC values. A record can look consistent while the payload still fails to decompress or fails its checksum.

PKWARE APPNOTE 6.3.10, ZIP file format

Save the result for cross-checking

Download zip-inspection.json to keep the entry ordinals, offsets, flags, declared values and latest check scope. Verify selected entry records one check in the exported report. Verify all files records every regular-file result.

The tool reads bounded classic ZIP archives with portable paths, Stored or Deflate data and supported flags. Keep a separate trusted hash or signature if you need to check where an archive came from.

PKWARE APPNOTE 6.3.10, ZIP file format

Common questions

Why does the ZIP index show an entry as unchecked?

Reading the index compares its supported records. Run a payload check to obtain an observed checksum and expanded length.

When does an entry use a data descriptor?

With bit 3 set, a descriptor after the payload records CRC-32 and both sizes. The tool reads its length and checks it against the index.

Sources

Put it into practice.

Related guides