Gzip, zstd or xz for archives I keep for years

Back to list2026-04-29
You

gzip, zstd or xz for archives I keep for years?

ChatGPT

The tradeoff in one table:

gzipzstdxz
Compressionbaselinebetterbest
Speedfastfastestslow
Decompressfastfastestmoderate
Ubiquityeverywhererecentcommon

For long-term archives the deciding factor is not ratio but whether the format opens without installing anything in ten years, which still favours gzip for the outer layer.

You

A folder of photos compresses to 98% of its size.

ChatGPT

JPEG and PNG are already compressed, so a second pass finds nothing and costs CPU. Compression helps text and helps structured binary; for media the win comes from deduplication instead, which is why backup tools chunk before compressing.

You

Is there a simpler version that gets most of the benefit?

ChatGPT

Yes: do the first step, skip the automation, and revisit in a month. Most of the value is in the first step, and most of the cost is in making it repeatable before you know it is right.