Revised code so that compression configuration is controlled by user script and default behavior is the same as before.