From 9271c2962ce4c9ecf93e84f7451b88c0e28b0237 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Fri, 21 Jun 2024 23:38:27 +0200 Subject: [PATCH] Change Snappy compressor to io.airlift:aircompressor --- pom.xml | 6 +++--- .../codehaus/plexus/archiver/snappy/SnappyCompressor.java | 2 +- .../codehaus/plexus/archiver/snappy/SnappyUnArchiver.java | 2 +- .../java/org/codehaus/plexus/archiver/tar/TarArchiver.java | 4 ++-- .../org/codehaus/plexus/archiver/tar/TarUnArchiver.java | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index a86c1d4ed..335ebd2af 100644 --- a/pom.xml +++ b/pom.xml @@ -91,9 +91,9 @@ ${slf4jVersion} - org.iq80.snappy - snappy - 0.4 + io.airlift + aircompressor + 0.27 org.tukaani diff --git a/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyCompressor.java b/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyCompressor.java index 3e932ad63..5f4b71440 100644 --- a/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyCompressor.java +++ b/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyCompressor.java @@ -18,9 +18,9 @@ import java.io.IOException; +import io.airlift.compress.snappy.SnappyFramedOutputStream; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.util.Compressor; -import org.iq80.snappy.SnappyFramedOutputStream; import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; import static org.codehaus.plexus.archiver.util.Streams.fileOutputStream; diff --git a/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyUnArchiver.java b/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyUnArchiver.java index 24c837ca7..6405bc20a 100644 --- a/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyUnArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/snappy/SnappyUnArchiver.java @@ -23,9 +23,9 @@ import java.io.IOException; import java.io.InputStream; +import io.airlift.compress.snappy.SnappyFramedInputStream; import org.codehaus.plexus.archiver.AbstractUnArchiver; import org.codehaus.plexus.archiver.ArchiverException; -import org.iq80.snappy.SnappyFramedInputStream; import static org.codehaus.plexus.archiver.util.Streams.bufferedInputStream; import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java index cae07804c..ba53a1b90 100644 --- a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java @@ -25,6 +25,7 @@ import java.nio.file.Files; import java.util.zip.GZIPOutputStream; +import io.airlift.compress.snappy.SnappyFramedOutputStream; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream; @@ -42,7 +43,6 @@ import org.codehaus.plexus.components.io.resources.PlexusIoResource; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; -import org.iq80.snappy.SnappyOutputStream; import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream; @@ -426,7 +426,7 @@ private OutputStream compress(TarCompressionMethod tarCompressionMethod, final O } else if (TarCompressionMethod.bzip2.equals(tarCompressionMethod)) { return new BZip2CompressorOutputStream(bufferedOutputStream(ostream)); } else if (TarCompressionMethod.snappy.equals(tarCompressionMethod)) { - return new SnappyOutputStream(bufferedOutputStream(ostream)); + return new SnappyFramedOutputStream(bufferedOutputStream(ostream)); } else if (TarCompressionMethod.xz.equals(tarCompressionMethod)) { return new XZCompressorOutputStream(bufferedOutputStream(ostream)); } else if (TarCompressionMethod.zstd.equals(tarCompressionMethod)) { diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java index 1b0b79509..507cb6cb6 100644 --- a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java +++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java @@ -23,6 +23,7 @@ import java.io.InputStream; import java.util.zip.GZIPInputStream; +import io.airlift.compress.snappy.SnappyFramedInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream; @@ -32,7 +33,6 @@ import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.util.Streams; import org.codehaus.plexus.components.io.filemappers.FileMapper; -import org.iq80.snappy.SnappyFramedInputStream; import static org.codehaus.plexus.archiver.util.Streams.bufferedInputStream; import static org.codehaus.plexus.archiver.util.Streams.fileInputStream;