Rough expectation for compressing JSON logs?
Repetitive JSON commonly reaches 8 to 12 times with zstd, because keys repeat on every line. If you are seeing less than three, the payload is probably already encoded or encrypted somewhere inside, which is worth knowing for reasons beyond storage.
gzip, zstd or xz for archives I keep for years?
The tradeoff in one table:
| gzip | zstd | xz | |
|---|---|---|---|
| Compression | baseline | better | best |
| Speed | fast | fastest | slow |
| Decompress | fast | fastest | moderate |
| Ubiquity | everywhere | recent | common |
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.
A folder of photos compresses to 98% of its size.
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.