From 838b22aa195c8e8a5a7c502ba14a75880eb80761 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Wed, 5 Jul 2023 11:02:22 +0200 Subject: [PATCH] Add zlib and zstd to the usable compression formats (They are available in the dependencies anyways so why not add them here ^^) --- .../de/bluecolored/bluemap/core/storage/Compression.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Compression.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Compression.java index 680a5553..2768954d 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Compression.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Compression.java @@ -24,17 +24,24 @@ */ package de.bluecolored.bluemap.core.storage; +import io.airlift.compress.zstd.ZstdInputStream; +import io.airlift.compress.zstd.ZstdOutputStream; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.NoSuchElementException; +import java.util.zip.DeflaterInputStream; +import java.util.zip.DeflaterOutputStream; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; public enum Compression { NONE("none", "", out -> out, in -> in), - GZIP("gzip", ".gz", GZIPOutputStream::new, GZIPInputStream::new); + GZIP("gzip", ".gz", GZIPOutputStream::new, GZIPInputStream::new), + ZLIB("zlib", ".zlib", DeflaterOutputStream::new, DeflaterInputStream::new), + ZSTD("zstd", ".zst", ZstdOutputStream::new, ZstdInputStream::new); private final String typeId; private final String fileSuffix;