Compression being compute intensive, I'd move for writing an extension/package for compression. Perhaps a encrypt/decrypt style where one chooses the compression scheme instead of the cipher...