replaced compressed attribute with has_compression method