Archive and file guides

Verify a GZIP round trip for a measurements CSV

·

Use GZIP to send a single losslessly compressed file. Try a repeatable CSV to see both the compression result and the recovered bytes before using the same workflow for an export you need to preserve.

GZIP Compressor & Decompressor

Compress the built-in measurements CSV

Select Load example in Compress mode. The file has the header id,reading and 400 lines containing A-17,21.4. Keep compression level 6 and choose Compress file. Before downloading, check that 4,011 input bytes became a smaller readings.csv.gz.

Try level 1 for the same source and compare the two output sizes. Repeated content compresses well. A small file or one that is already compressed can produce a larger result because the compressed format has its own header and trailer.

RFC 1952, GZIP member fields and the CRCGNU gzip manual, compression levels and concatenated members

Recover the original CSV from the stream

Choose Use output in Decompress, then Decompress file. The result returns to 4,011 bytes and is named readings.csv. Follow the same steps for an existing .gz by choosing it in Decompress mode.

Download the restored CSV and open it in a text editor. Verify the header and repeated records. For a byte-level check when using your own file, compute the same checksum for the original and the restored download. A text editor can save a file with different line endings, so compare the downloads before re-saving them.

RFC 1952, GZIP member fields and the CRCWHATWG Compression Standard, GZIP validation

Investigate an incomplete or unreadable transfer

A damaged trailer can prevent a download even when some data looked readable. Obtain a fresh copy if the workspace reports a checksum or completeness error.

Some command-line workflows join several compressed GZIP members into one file. If your .gz is structured that way, use a GZIP reader that supports concatenated members. A .tar.gz is different: its compressed byte stream is an archive, so use TAR.GZ Extractor to recover its members.

GNU gzip manual, compression levels and concatenated membersWHATWG Compression Standard, GZIP validation

Common questions

Does the tool use the original name stored in the GZIP header?

It uses the name of the supplied file and removes its GZIP suffix. A .tgz name becomes .tar.

What does the GZIP checksum prove?

The checksum detects typical corruption in the decompressed stream. It cannot establish who created or sent the file.

Sources

Put it into practice.

Related guides