io.opentelemetry.contrib.compressor.zstd.ZstdCompressor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-compressor-zstd Show documentation
Show all versions of opentelemetry-compressor-zstd Show documentation
zstd compressor implementation for use with OTLP exporters
The newest version!
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.contrib.compressor.zstd;
import com.github.luben.zstd.ZstdOutputStream;
import io.opentelemetry.exporter.internal.compression.Compressor;
import java.io.IOException;
import java.io.OutputStream;
public final class ZstdCompressor implements Compressor {
private static final ZstdCompressor INSTANCE = new ZstdCompressor();
private ZstdCompressor() {}
public static ZstdCompressor getInstance() {
return INSTANCE;
}
@Override
public String getEncoding() {
return "zstd";
}
@Override
public OutputStream compress(OutputStream outputStream) throws IOException {
return new ZstdOutputStream(outputStream);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy