From 37f00260f4fe70747ddf6b3e842783da12b820d2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 14 Oct 2024 14:26:45 +0200 Subject: Archive: Support .tar.lz4 for output --- src/main/java/org/openslx/satserver/util/Archive.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/java/org/openslx/satserver/util/Archive.java b/src/main/java/org/openslx/satserver/util/Archive.java index 3a285cd..f622a0e 100644 --- a/src/main/java/org/openslx/satserver/util/Archive.java +++ b/src/main/java/org/openslx/satserver/util/Archive.java @@ -26,6 +26,7 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.compressors.CompressorStreamFactory; import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream; import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream; +import org.apache.commons.compress.compressors.lz4.BlockLZ4CompressorOutputStream; import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; @@ -85,6 +86,8 @@ public class Archive compressedOutputStream = new BufferedOutputStream( new XZCompressorOutputStream( outputStream ) ); } else if ( outputFile.endsWith( ".tar.lzma" ) ) { compressedOutputStream = new BufferedOutputStream( new XZCompressorOutputStream( outputStream ) ); + } else if ( outputFile.endsWith( ".tar.lz4" ) ) { + compressedOutputStream = new BufferedOutputStream( new BlockLZ4CompressorOutputStream( outputStream ) ); } else if ( outputFile.endsWith( ".tar" ) ) { compressedOutputStream = outputStream; } else { -- cgit v1.2.3-55-g7522