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 20
20
import org .apache .commons .compress .archivers .tar .TarArchiveEntry ;
21
21
import org .apache .commons .compress .archivers .tar .TarArchiveInputStream ;
22
22
import org .apache .commons .compress .compressors .bzip2 .BZip2CompressorInputStream ;
23
+ import org .apache .commons .compress .compressors .xz .XZCompressorInputStream ;
23
24
import org .codehaus .plexus .archiver .AbstractUnArchiver ;
24
25
import org .codehaus .plexus .archiver .ArchiverException ;
25
26
import org .codehaus .plexus .archiver .util .Streams ;
@@ -63,6 +64,7 @@ public TarUnArchiver( File sourceFile )
63
64
* <li>gzip - Gzip compression</li>
64
65
* <li>bzip2 - Bzip2 compression</li>
65
66
* <li>snappy - Snappy compression</li>
67
+ * <li>xz - Xz compression</li>
66
68
* </ul>
67
69
*
68
70
* @param method compression method
@@ -149,6 +151,10 @@ else if ( compression == UntarCompressionMethod.BZIP2 )
149
151
else if ( compression == UntarCompressionMethod .SNAPPY )
150
152
{
151
153
return new SnappyInputStream ( istream , true );
154
+ }
155
+ else if (compression == UntarCompressionMethod .XZ )
156
+ {
157
+ return new XZCompressorInputStream (istream );
152
158
}
153
159
return istream ;
154
160
}
@@ -161,7 +167,8 @@ public static enum UntarCompressionMethod
161
167
NONE ( "none" ),
162
168
GZIP ( "gzip" ),
163
169
BZIP2 ( "bzip2" ),
164
- SNAPPY ( "snappy" );
170
+ SNAPPY ( "snappy" ),
171
+ XZ ("xz" );
165
172
166
173
final String value ;
167
174
You can’t perform that action at this time.
0 commit comments