Question: 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

Answer: 
`gunzip -t` checks the compressed file integrity.
If you are just downloading a tarball, then you can md5sum it on the other end and then check that.