Gzip member recovery

A gzip file may contain multiple members, so one damaged member does not always invalidate every other member.

Each gzip member has a header, compressed DEFLATE data, and a trailer containing CRC32 and uncompressed size modulo 2^32. Concatenated members are valid, which can allow intact members around a damaged section to remain independently useful.

Understand the symptom

The trailer validates decoded bytes; it does not repair the DEFLATE stream.

WHY

What is happening

A CRC mismatch differs from a missing trailer or a truncated compressed block. Member boundaries, optional header fields, and expected payload structure help determine what can be separated and verified.

What you may see

Symptoms that change the recovery path.

01

CRC error

Decoded member content differs from its stored checksum.

02

Length error

The trailer size does not match decoded length modulo 2^32.

03

Unexpected end

Compressed data or the eight-byte trailer is incomplete.

04

First member extracts

A later concatenated member may be the damaged portion.

Protect the source

Actions that can make the situation worse.

01

Ignoring CRC can hide changed data

Partial output must be labeled and validated.

02

Appending a fake trailer misleads

It does not restore missing compressed bytes.

03

Recompression changes provenance

Original member boundaries and headers are lost.

Do this now

Safe steps before evaluation.

01

Hash and copy the gzip

Keep the original read-only.

02

Save verbose test output

Record member order, offsets, CRC, and length errors.

03

Identify the payload

Note whether content should be TAR, SQL, logs, or another format.

04

Collect alternate versions

Keep rotations, mirrors, attachments, and object-store versions.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Member scan

NEPFOSYS maps headers, DEFLATE ranges, trailers, and concatenated members.

02

Selective extraction

Complete members and readable ranges are decoded from protected copies.

03

Payload validation

Recovered output is checked by checksum, record structure, archive layout, and expected length.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Can gzip contain more than one stream?

Yes. Concatenated gzip members are valid and normally decode in sequence.

Can CRC32 rebuild damaged data?

No. It detects a mismatch but cannot identify the original missing bytes.

Why does a file appear to extract before failing?

The decoder may emit valid earlier members or bytes before reaching damage.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case