summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java b/vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java
new file mode 100644
index 00000000000..837482a089a
--- /dev/null
+++ b/vespajlib/src/test/java/com/yahoo/compress/ZstdCompressorTest.java
@@ -0,0 +1,22 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.compress;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+
+/**
+ * @author bjorncs
+ */
+class ZstdCompressorTest {
+
+ @Test
+ void compresses_and_decompresses_input() {
+ byte[] inputData = "The quick brown fox jumps over the lazy dog".getBytes();
+ ZstdCompressor compressor = new ZstdCompressor();
+ byte[] compressedData = compressor.compress(inputData, 0, inputData.length);
+ byte[] decompressedData = compressor.decompress(compressedData, 0, compressedData.length);
+ assertArrayEquals(inputData, decompressedData);
+ }
+
+} \ No newline at end of file