public class LZ4Compressor extends java.lang.Object implements Compressor
| Modifier and Type | Field and Description |
|---|---|
static LZ4Compressor |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
int |
compress(byte[] src,
int srcOffset,
int length,
byte[] dest,
int destOffset) |
byte[] |
decompress(byte[] src,
int offset,
int length,
int expectedDecompressedLength) |
int |
maxCompressedLength(int length) |
public static final LZ4Compressor INSTANCE
public int maxCompressedLength(int length)
maxCompressedLength in interface Compressorlength - the decompressed length being compressedpublic int compress(byte[] src,
int srcOffset,
int length,
byte[] dest,
int destOffset)
throws java.io.IOException
compress in interface Compressorsrc - the input bytes to be compressedsrcOffset - the offset to start compressing src fromlength - the total number of bytes from srcOffset to pass to the compressor implementationdest - the output buffer to write the compressed bytes todestOffset - the offset into the dest buffer to start writing the compressed bytesjava.io.IOException - if the compression implementation failed while compressing the input bytespublic byte[] decompress(byte[] src,
int offset,
int length,
int expectedDecompressedLength)
throws java.io.IOException
decompress in interface Compressorsrc - the compressed bytes to be decompressedexpectedDecompressedLength - the expected length the input bytes will decompress tojava.io.IOException - thrown if the compression implementation failed to decompress the provided input bytesCopyright © 2009-2019 The Apache Software Foundation