compress method and test method fixed