GZip

It's impossible to know the uncompressed size without read all data.

gzip is file format used to compress. It use deflate compression algorithm

gzip is GZIP headers, DEFLATE data (compressed data), and a checksum

zlib is the most common library to handle gzip file format

Compress gzip without save filename and timestamp gzip -9 -n -k -f file

Resources

Concatenation

You can concatenate/merge multiple gzip in one gzip:

echo 1 > 1.txt ; echo 2 > 2.txt; echo 3 > 3.txt;
gzip 1; gzip 2; gzip 3;
cat 1.gz 2.gz 3.gz > all.gz

gunzip -c all.gz > all.txt

cat all.txt
# will output:
1
2
3

The same as cat 1.txt 2.txt 3.txt

Can be usefull when you want add a small data before or after a big chunk already compressed

Last updated