add method to detect if compressed