if (!(object instanceof InputStream)) {
throw new IllegalArgumentException("Can only compress puts that use an InputStream");
}
try {
return new CompressingGzipInputStream((InputStream)object) ;
} catch (IOException ioe) {
throw new BadCompressionException(ioe);
}
}