There are many general purpose compression programs. 7z, zip, tar and etc (https://en.wikipedia.org/wiki/Comparison_of_file_archivers)
Depending on the type of data one may perform better (i.e. speed / size ratio)
I want to know is there a quick way( possibly a heuristic approach) to say that for some typethe given data/file one perform better than another?