private InputStream decompress ( UntarCompressionMethod compression , final File file , final InputStream istream ) throws IOException , ArchiverException { if ( compression == UntarCompressionMethod . GZIP ) { return new GZIPInputStream ( istream ) ; } else if ( compression == UntarCompressionMethod . BZIP2 ) { return new BZip2CompressorInputStream ( istream ) ; } else if ( compression == UntarCompressionMethod . SNAPPY ) { return new SnappyInputStream ( istream ) ; } return istream ; }
This method wraps the input stream with the corresponding decompression method