File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/org/codehaus/plexus/archiver/tar Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2020import org .apache .commons .compress .archivers .tar .TarArchiveEntry ;
2121import org .apache .commons .compress .archivers .tar .TarArchiveInputStream ;
2222import org .apache .commons .compress .compressors .bzip2 .BZip2CompressorInputStream ;
23+ import org .apache .commons .compress .compressors .xz .XZCompressorInputStream ;
2324import org .codehaus .plexus .archiver .AbstractUnArchiver ;
2425import org .codehaus .plexus .archiver .ArchiverException ;
2526import org .codehaus .plexus .archiver .util .Streams ;
@@ -63,6 +64,7 @@ public TarUnArchiver( File sourceFile )
6364 * <li>gzip - Gzip compression</li>
6465 * <li>bzip2 - Bzip2 compression</li>
6566 * <li>snappy - Snappy compression</li>
67+ * <li>xz - Xz compression</li>
6668 * </ul>
6769 *
6870 * @param method compression method
@@ -149,6 +151,10 @@ else if ( compression == UntarCompressionMethod.BZIP2 )
149151 else if ( compression == UntarCompressionMethod .SNAPPY )
150152 {
151153 return new SnappyInputStream ( istream , true );
154+ }
155+ else if (compression == UntarCompressionMethod .XZ )
156+ {
157+ return new XZCompressorInputStream (istream );
152158 }
153159 return istream ;
154160 }
@@ -161,7 +167,8 @@ public static enum UntarCompressionMethod
161167 NONE ( "none" ),
162168 GZIP ( "gzip" ),
163169 BZIP2 ( "bzip2" ),
164- SNAPPY ( "snappy" );
170+ SNAPPY ( "snappy" ),
171+ XZ ("xz" );
165172
166173 final String value ;
167174
You can’t perform that action at this time.
0 commit comments