public class DeflateCompressor extends java.lang.Object implements ICompressor
Modifier and Type | Field and Description |
---|---|
static DeflateCompressor |
instance |
Modifier and Type | Method and Description |
---|---|
void |
compress(java.nio.ByteBuffer input,
java.nio.ByteBuffer output)
Compression for ByteBuffers.
|
int |
compressArray(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset,
int maxOutputLength) |
void |
compressBuffer(java.nio.ByteBuffer input,
java.nio.ByteBuffer output) |
static DeflateCompressor |
create(java.util.Map<java.lang.String,java.lang.String> compressionOptions) |
int |
initialCompressedBufferLength(int sourceLen) |
BufferType |
preferredBufferType()
Returns the preferred (most efficient) buffer type for this compressor.
|
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) |
int |
uncompress(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset,
int maxOutputLength) |
void |
uncompress(java.nio.ByteBuffer input,
java.nio.ByteBuffer output)
Decompression for DirectByteBuffers.
|
void |
uncompressBuffer(java.nio.ByteBuffer input,
java.nio.ByteBuffer output) |
public static final DeflateCompressor instance
public static DeflateCompressor create(java.util.Map<java.lang.String,java.lang.String> compressionOptions)
public java.util.Set<java.lang.String> supportedOptions()
supportedOptions
in interface ICompressor
public int initialCompressedBufferLength(int sourceLen)
initialCompressedBufferLength
in interface ICompressor
public void compress(java.nio.ByteBuffer input, java.nio.ByteBuffer output)
ICompressor
compress
in interface ICompressor
public int compressArray(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength)
public void compressBuffer(java.nio.ByteBuffer input, java.nio.ByteBuffer output)
public void uncompress(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws java.io.IOException
ICompressor
uncompress
in interface ICompressor
java.io.IOException
public void uncompressBuffer(java.nio.ByteBuffer input, java.nio.ByteBuffer output) throws java.io.IOException
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 int uncompress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength) throws java.io.IOException
java.io.IOException
public boolean supports(BufferType bufferType)
ICompressor
supports
in interface ICompressor
public BufferType preferredBufferType()
ICompressor
preferredBufferType
in interface ICompressor
Copyright © 2017 The Apache Software Foundation