All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy