Added compressing functions.