I have found the question How to determine if data is valid tar file without a file?, but I was wondering: is there a ready made command line solution?
I have tried the following command and they work well.
bzip2 -t file.bz2 gunzip -t file.gz
However, we can found these two command are time-consuming. Maybe we need some more quick way to determine the intact of the compress files.