Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create .gz file in Java which contain couple files

Tags:

java

gzip

How to compress in Java several files in one .gz file ?

like image 982
Damir Avatar asked Feb 21 '26 11:02

Damir


1 Answers

You must somehow join them before gzipping. Gzip can compress only one file, so most frequent solution is to tar files first and them gzip newly created tar.

like image 113
Michał Niklas Avatar answered Feb 24 '26 00:02

Michał Niklas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!