Package org.apache.avro.file
Class ZstandardCodec
java.lang.Object
org.apache.avro.file.Codec
org.apache.avro.file.ZstandardCodec
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final boolean -
Constructor Summary
ConstructorsConstructorDescriptionZstandardCodec(int compressionLevel, boolean useChecksum, boolean useBufferPool) Create a ZstandardCodec instance with the given compressionLevel, checksum, and bufferPool option -
Method Summary
Modifier and TypeMethodDescriptioncompress(ByteBuffer data) Compresses the input datadecompress(ByteBuffer compressedData) Decompress the databooleanCodecs must implement an equals() method.getName()Name of the codec; written to the file's metadata.inthashCode()Codecs must implement a hashCode() method that is consistent with equals().toString()Methods inherited from class org.apache.avro.file.Codec
computeOffset
-
Field Details
-
DEFAULT_COMPRESSION
public static final int DEFAULT_COMPRESSION- See Also:
-
DEFAULT_USE_BUFFERPOOL
public static final boolean DEFAULT_USE_BUFFERPOOL- See Also:
-
-
Constructor Details
-
ZstandardCodec
public ZstandardCodec(int compressionLevel, boolean useChecksum, boolean useBufferPool) Create a ZstandardCodec instance with the given compressionLevel, checksum, and bufferPool option
-
-
Method Details
-
getName
Description copied from class:CodecName of the codec; written to the file's metadata. -
compress
Description copied from class:CodecCompresses the input data- Specified by:
compressin classCodec- Throws:
IOException
-
decompress
Description copied from class:CodecDecompress the data- Specified by:
decompressin classCodec- Throws:
IOException
-
hashCode
public int hashCode()Description copied from class:CodecCodecs must implement a hashCode() method that is consistent with equals(). -
equals
Description copied from class:CodecCodecs 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 -
toString
-