Class ZstdCompressor

java.lang.Object
org.opensearch.compress.ZstdCompressor
All Implemented Interfaces:
org.opensearch.core.compress.Compressor

public class ZstdCompressor extends Object implements org.opensearch.core.compress.Compressor
Compressor implementation based on the ZSTD compression algorithm.
Opensearch.api:
- registered name requires BWC support
Opensearch.experimental:
- class methods might change
  • Field Details

    • NAME

      @PublicApi(since="2.10.0") public static final String NAME
      The name to register the compressor by
      See Also:
      Opensearch.api:
      - requires BWC support
  • Constructor Details

    • ZstdCompressor

      public ZstdCompressor()
  • Method Details

    • isCompressed

      public boolean isCompressed(org.opensearch.core.common.bytes.BytesReference bytes)
      Specified by:
      isCompressed in interface org.opensearch.core.compress.Compressor
    • headerLength

      public int headerLength()
      Specified by:
      headerLength in interface org.opensearch.core.compress.Compressor
    • threadLocalInputStream

      public InputStream threadLocalInputStream(InputStream in) throws IOException
      Specified by:
      threadLocalInputStream in interface org.opensearch.core.compress.Compressor
      Throws:
      IOException
    • threadLocalOutputStream

      public OutputStream threadLocalOutputStream(OutputStream out) throws IOException
      Specified by:
      threadLocalOutputStream in interface org.opensearch.core.compress.Compressor
      Throws:
      IOException
    • uncompress

      public org.opensearch.core.common.bytes.BytesReference uncompress(org.opensearch.core.common.bytes.BytesReference bytesReference) throws IOException
      Specified by:
      uncompress in interface org.opensearch.core.compress.Compressor
      Throws:
      IOException
    • compress

      public org.opensearch.core.common.bytes.BytesReference compress(org.opensearch.core.common.bytes.BytesReference bytesReference) throws IOException
      Specified by:
      compress in interface org.opensearch.core.compress.Compressor
      Throws:
      IOException