CompressionCodec c = getCodec(codecName);
//TODO: Create the decompressor only once at init time.
Class<?> cx = c.getClass();
DirectDecompressionCodec d=null;
DirectDecompressor decompr=null;
if (DirectDecompressionCodec.class.isAssignableFrom(cx)) {
d=(DirectDecompressionCodec)c;
}
if(d!=null) {
decompr = d.createDirectDecompressor();
}
if(d!=null && decompr!=null){
decompr.decompress(inpBuffer, outBuffer);
}else{
logger.warn("This Hadoop implementation does not support a " + codecName +
" direct decompression codec interface. "+
"Direct decompression is available only on *nix systems with Hadoop 2.3 or greater. "+
"Read operations will be a little slower. ");