InputStream is = resource.read();
try {
return new GZIPInputStream(is);
} catch (Exception e) {
String message = String.format("Unable to create gzip input stream for resource %s.", resource.getDisplayName());
throw new ResourceException(message, e);
}
}