Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check a completed gzip file?

Tags:

c

linux

gzip

I am writing a function in C that get a .tar.gz data transfer, when I got the data, I should do a check that whether the transfer is complete and the data is valid, so any tips about check the integrity of gzip data?

regards

like image 555
liunx Avatar asked Dec 04 '22 15:12

liunx


2 Answers

gunzip -t checks the compressed file integrity.

like image 188
Yunchi Avatar answered Dec 18 '22 07:12

Yunchi


If you are just downloading a tarball, then you can md5sum it on the other end and then check that.

like image 34
Thomas Dignan Avatar answered Dec 18 '22 05:12

Thomas Dignan