added compression function for content