public class ZstdCodec extends Object implements org.apache.orc.CompressionCodec, org.apache.orc.impl.DirectDecompressionCodec
NOTE: The file was copied and modified to support zstd-jni. This feature is only supported in ORC 2.0, but 2.0 only supports JDK17. We need to support JDK8.
Constructor and Description |
---|
ZstdCodec() |
ZstdCodec(int level,
int windowLog) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
compress(ByteBuffer in,
ByteBuffer out,
ByteBuffer overflow,
Options options)
Compresses an input ByteBuffer into an output ByteBuffer using Zstandard compression.
|
void |
decompress(ByteBuffer in,
ByteBuffer out) |
void |
destroy() |
void |
directDecompress(ByteBuffer in,
ByteBuffer out) |
protected static byte[] |
getBuffer(int size) |
Options |
getDefaultOptions() |
CompressionKind |
getKind() |
org.apache.orc.impl.ZstdCodec.ZstdOptions |
getZstdOptions() |
boolean |
isAvailable() |
void |
reset() |
public ZstdCodec(int level, int windowLog)
public ZstdCodec()
public org.apache.orc.impl.ZstdCodec.ZstdOptions getZstdOptions()
protected static byte[] getBuffer(int size)
public Options getDefaultOptions()
public boolean compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, Options options) throws IOException
in
- the bytes to compressout
- the compressed bytesoverflow
- put any additional bytes hereoptions
- the options to control compressionIOException
public void decompress(ByteBuffer in, ByteBuffer out) throws IOException
decompress
in interface org.apache.orc.CompressionCodec
IOException
public boolean isAvailable()
isAvailable
in interface org.apache.orc.impl.DirectDecompressionCodec
public void directDecompress(ByteBuffer in, ByteBuffer out) throws IOException
directDecompress
in interface org.apache.orc.impl.DirectDecompressionCodec
IOException
public void reset()
reset
in interface org.apache.orc.CompressionCodec
public void destroy()
public CompressionKind getKind()
public void close()
close
in interface org.apache.orc.CompressionCodec
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.