Added functionality to check if gzipped or not.