Add zlib and zstd to the usable compression formats

(They are available in the dependencies anyways so why not add them here ^^)
This commit is contained in:
Lukas Rieger (Blue) 2023-07-05 11:02:22 +02:00
parent 1f7f51c1e1
commit 838b22aa19
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -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;