diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-12-28 11:32:05 +0000 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2023-01-03 13:05:55 +0100 |
commit | 6ce10cc8150f5686d267e5e49e069ea2f37e4e8a (patch) | |
tree | cd8cd3916125b891c7d00513247e7e4e27c55fd7 /vespajlib | |
parent | d5ca7762b704300d708e46007e781add20097fc4 (diff) |
add fork of airlift zstd code
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/pom.xml | 5 | ||||
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/compress/ZstdCompressor.java | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/vespajlib/pom.xml b/vespajlib/pom.xml index d903fb5ec0d..d902486a849 100644 --- a/vespajlib/pom.xml +++ b/vespajlib/pom.xml @@ -36,6 +36,11 @@ <artifactId>aircompressor</artifactId> </dependency> <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>airlift-zstd</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>net.openhft</groupId> <artifactId>zero-allocation-hashing</artifactId> <exclusions> diff --git a/vespajlib/src/main/java/com/yahoo/compress/ZstdCompressor.java b/vespajlib/src/main/java/com/yahoo/compress/ZstdCompressor.java index 29a58dbde47..4900351bdd7 100644 --- a/vespajlib/src/main/java/com/yahoo/compress/ZstdCompressor.java +++ b/vespajlib/src/main/java/com/yahoo/compress/ZstdCompressor.java @@ -11,8 +11,8 @@ import java.util.Arrays; */ public class ZstdCompressor { - private static final io.airlift.compress.zstd.ZstdCompressor compressor = new io.airlift.compress.zstd.ZstdCompressor(); - private static final io.airlift.compress.zstd.ZstdDecompressor decompressor = new io.airlift.compress.zstd.ZstdDecompressor(); + private static final ai.vespa.airlift.zstd.ZstdCompressor compressor = new ai.vespa.airlift.zstd.ZstdCompressor(); + private static final ai.vespa.airlift.zstd.ZstdDecompressor decompressor = new ai.vespa.airlift.zstd.ZstdDecompressor(); public byte[] compress(byte[] input, int inputOffset, int inputLength) { int maxCompressedLength = getMaxCompressedLength(inputLength); @@ -46,7 +46,7 @@ public class ZstdCompressor { } public static int getDecompressedLength(byte[] input, int inputOffset, int inputLength) { - return (int) io.airlift.compress.zstd.ZstdDecompressor.getDecompressedSize(input, inputOffset, inputLength); + return (int) ai.vespa.airlift.zstd.ZstdDecompressor.getDecompressedSize(input, inputOffset, inputLength); } } |