final File f = dropExtension(file);
final File tempFile = File.createTempFile(dropExtension(f).getName(), getExtension(f));
tempFile.deleteOnExit();
BufferedInputStream in = null;
FileOutputStream out = null;
CompressorInputStream compressorIn = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
out = new FileOutputStream(tempFile);
compressorIn = new CompressorStreamFactory().createCompressorInputStream(in);
final byte[] buffer = new byte[1024];
int i;
while ((i = compressorIn.read(buffer)) != -1) {
out.write(buffer, 0, i);
}
} catch (CompressorException e) {
throw new IOException(e);
} finally {