public class LZ4Compressor extends java.lang.Object implements ICompressor
ICompressor.Uses
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LZ4_COMPRESSOR_TYPE |
static java.lang.String |
LZ4_FAST_COMPRESSOR |
static java.lang.String |
LZ4_HIGH_COMPRESSION_LEVEL |
static java.lang.String |
LZ4_HIGH_COMPRESSOR |
Modifier and Type | Method and Description |
---|---|
void |
compress(java.nio.ByteBuffer input,
java.nio.ByteBuffer output)
Compression for ByteBuffers.
|
static LZ4Compressor |
create(java.util.Map<java.lang.String,java.lang.String> args) |
int |
initialCompressedBufferLength(int chunkLength) |
BufferType |
preferredBufferType()
Returns the preferred (most efficient) buffer type for this compressor.
|
java.util.Set<ICompressor.Uses> |
recommendedUses()
Hints to Cassandra which uses this compressor is recommended for.
|
java.util.Set<java.lang.String> |
supportedOptions() |
boolean |
supports(BufferType bufferType)
Checks if the given buffer would be supported by the compressor.
|
int |
uncompress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset) |
void |
uncompress(java.nio.ByteBuffer input,
java.nio.ByteBuffer output)
Decompression for DirectByteBuffers.
|
static java.lang.Integer |
validateCompressionLevel(java.lang.String compressionLevel) |
static java.lang.String |
validateCompressorType(java.lang.String compressorType) |
public static final java.lang.String LZ4_FAST_COMPRESSOR
public static final java.lang.String LZ4_HIGH_COMPRESSOR
public static final java.lang.String LZ4_HIGH_COMPRESSION_LEVEL
public static final java.lang.String LZ4_COMPRESSOR_TYPE
public static LZ4Compressor create(java.util.Map<java.lang.String,java.lang.String> args) throws ConfigurationException
ConfigurationException
public int initialCompressedBufferLength(int chunkLength)
initialCompressedBufferLength
in interface ICompressor
public void compress(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws java.io.IOException
ICompressor
compress
in interface ICompressor
java.io.IOException
public int uncompress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws java.io.IOException
uncompress
in interface ICompressor
java.io.IOException
public void uncompress(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws java.io.IOException
ICompressor
uncompress
in interface ICompressor
java.io.IOException
public java.util.Set<java.lang.String> supportedOptions()
supportedOptions
in interface ICompressor
public static java.lang.String validateCompressorType(java.lang.String compressorType) throws ConfigurationException
ConfigurationException
public static java.lang.Integer validateCompressionLevel(java.lang.String compressionLevel) throws ConfigurationException
ConfigurationException
public BufferType preferredBufferType()
ICompressor
preferredBufferType
in interface ICompressor
public boolean supports(BufferType bufferType)
ICompressor
supports
in interface ICompressor
public java.util.Set<ICompressor.Uses> recommendedUses()
ICompressor
recommendedUses
in interface ICompressor
Copyright © 2009- The Apache Software Foundation