Top Inners Fields Constructors Methods
org.apache.avro.file

public Class ZstandardCodec

extends Codec
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .OutputStream, java.nio.ByteBuffer, org.apache.avro.util.NonCopyingByteArrayOutputStream, org.apache.commons.compress.utils.IOUtils

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final int
private static final int
public static final int
public static final boolean
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
public
ZstandardCodec(int compressionLevel, boolean useChecksum, boolean useBufferPool)

Create a ZstandardCodec instance with the given compressionLevel, checksum, and bufferPool option

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
compress(ByteBuffer data)

Implements abstract org.apache.avro.file.Codec.compress.

Compresses the input data
public ByteBuffer
decompress(ByteBuffer compressedData)

Implements abstract org.apache.avro.file.Codec.decompress.

Decompress the data
public boolean
equals(Object
the reference object with which to compare.
obj
)

Implements abstract org.apache.avro.file.Codec.equals.

Codecs must implement an equals() method.
public String
getName()

Implements abstract org.apache.avro.file.Codec.getName.

Name of the codec; written to the file's metadata.
public int
hashCode()

Implements abstract org.apache.avro.file.Codec.hashCode.

Codecs must implement a hashCode() method that is consistent with equals().
public String
toString()

Overrides org.apache.avro.file.Codec.toString.

Returns a string representation of the object.
Inherited from org.apache.avro.file.Codec:
computeOffset

Field Detail

compressionLevelback to summary
private final int compressionLevel
DEFAULT_BUFFER_SIZEback to summary
private static final int DEFAULT_BUFFER_SIZE
DEFAULT_COMPRESSIONback to summary
public static final int DEFAULT_COMPRESSION
DEFAULT_USE_BUFFERPOOLback to summary
public static final boolean DEFAULT_USE_BUFFERPOOL
useBufferPoolback to summary
private final boolean useBufferPool
useChecksumback to summary
private final boolean useChecksum

Constructor Detail

ZstandardCodecback to summary
public ZstandardCodec(int compressionLevel, boolean useChecksum, boolean useBufferPool)

Create a ZstandardCodec instance with the given compressionLevel, checksum, and bufferPool option

Method Detail

compressback to summary
public ByteBuffer compress(ByteBuffer data) throws IOException

Implements abstract org.apache.avro.file.Codec.compress.

Doc from org.apache.avro.file.Codec.compress.

Compresses the input data

Annotations
@Override
decompressback to summary
public ByteBuffer decompress(ByteBuffer compressedData) throws IOException

Implements abstract org.apache.avro.file.Codec.decompress.

Doc from org.apache.avro.file.Codec.decompress.

Decompress the data

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Implements abstract org.apache.avro.file.Codec.equals.

Doc from org.apache.avro.file.Codec.equals.

Codecs must implement an equals() method. Two codecs, A and B are equal if: the result of A and B decompressing content compressed by A is the same AND the result of A and B decompressing content compressed by B is the same

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.apache.avro.file.Codec.getName.

Doc from org.apache.avro.file.Codec.getName.

Name of the codec; written to the file's metadata.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Implements abstract org.apache.avro.file.Codec.hashCode.

Doc from org.apache.avro.file.Codec.hashCode.

Codecs must implement a hashCode() method that is consistent with equals().

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.apache.avro.file.Codec.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.apache.avro.file back to summary

pack-priv Class ZstandardCodec.Option

extends CodecFactory
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final boolean
private final boolean
Inherited from org.apache.avro.file.CodecFactory:
DEFAULT_DEFLATE_LEVELDEFAULT_XZ_LEVELDEFAULT_ZSTANDARD_BUFFERPOOLDEFAULT_ZSTANDARD_LEVEL

Constructor Summary

AccessConstructor and Description
pack-priv
Option(int compressionLevel, boolean useChecksum, boolean useBufferPool)

Method Summary

Modifier and TypeMethod and Description
protected Codec
createInstance()

Implements abstract org.apache.avro.file.CodecFactory.createInstance.

Creates internal Codec.
Inherited from org.apache.avro.file.CodecFactory:
addCodecbzip2CodecdeflateCodecfromStringnullCodecsnappyCodectoStringxzCodeczstandardCodeczstandardCodeczstandardCodec

Field Detail

compressionLevelback to summary
private final int compressionLevel
useBufferPoolback to summary
private final boolean useBufferPool
useChecksumback to summary
private final boolean useChecksum

Constructor Detail

Optionback to summary
pack-priv Option(int compressionLevel, boolean useChecksum, boolean useBufferPool)

Method Detail

createInstanceback to summary
protected Codec createInstance()

Implements abstract org.apache.avro.file.CodecFactory.createInstance.

Doc from org.apache.avro.file.CodecFactory.createInstance.

Creates internal Codec.

Annotations
@Override