Changing the compression function

according to the dissertation of Brett Swanson