public class CompressionDescriptor
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSION_BYTE_BUFFER_LENGTH |
Constructor and Description |
---|
CompressionDescriptor() |
CompressionDescriptor(DataBuffer buffer)
Create a compression descriptor from the given
data buffer elements
|
CompressionDescriptor(DataBuffer buffer,
NDArrayCompressor compressor)
Initialize a compression descriptor
based on the given data buffer (for the sizes)
and the compressor to get the opType
|
CompressionDescriptor(DataBuffer buffer,
java.lang.String algorithm)
Initialize a compression descriptor
based on the given algorithm and data buffer
|
Modifier and Type | Method and Description |
---|---|
CompressionDescriptor |
clone() |
static CompressionDescriptor |
fromByteBuffer(java.nio.ByteBuffer byteBuffer)
Instantiate a compression descriptor from
the given bytebuffer
|
java.nio.ByteBuffer |
toByteBuffer()
Return a direct allocated
bytebuffer from the compression codec.
|
public static final int COMPRESSION_BYTE_BUFFER_LENGTH
public CompressionDescriptor()
public CompressionDescriptor(DataBuffer buffer)
buffer
- the databuffer to create
the compression descriptor frompublic CompressionDescriptor(DataBuffer buffer, java.lang.String algorithm)
buffer
- the data buffer to base the sizes off ofalgorithm
- the algorithm used
in the descriptorpublic CompressionDescriptor(DataBuffer buffer, NDArrayCompressor compressor)
buffer
- compressor
- public static CompressionDescriptor fromByteBuffer(java.nio.ByteBuffer byteBuffer)
byteBuffer
- the bytebuffer to instantiate
the descriptor frompublic java.nio.ByteBuffer toByteBuffer()
public CompressionDescriptor clone()
clone
in class java.lang.Object