com.aliyun.datahub.client.impl.compress.CompressorFactory Maven / Gradle / Ivy
The newest version!
package com.aliyun.datahub.client.impl.compress;
import com.aliyun.datahub.client.model.CompressType;
public class CompressorFactory {
public static Compressor getCompressor(CompressType type) {
if (type == null) {
return null;
}
switch (type) {
case DEFLATE:
return new DeflateCompressor();
case LZ4:
return new Lz4Compressor();
case ZSTD:
return new ZstdCompressor();
default:
return null;
}
}
}