Modify compression function