Pradeep
Pradeep

Reputation: 109

Can i concatenate two already gzipped files (using gzip) and then gunzip them?

Can i concatenate two already gzipped files (using gzip) and then gunzip them? As of today, I download the gzipped files from remote servers, gunzip them individually and then cat them to merge. Looking to make things faster here by merging the gzipped files and then gunzipping.

Upvotes: 5

Views: 1802

Answers (1)

Mark Adler
Mark Adler

Reputation: 112239

Yes. The concatenation of gzip streams is also a valid gzip stream. The result of gunzipping is the concatenation of the uncompressed data.

Upvotes: 2

Related Questions