Make compression routine pluggable