public class Lz4BlockDecompressor extends Object implements BlockDecompressor
Lz4BlockCompressor.
It reads from and writes to byte arrays provided from the outside, thus reducing copy time.
This class is copied and modified from LZ4BlockInputStream.
| Constructor and Description |
|---|
Lz4BlockDecompressor() |
| Modifier and Type | Method and Description |
|---|---|
int |
decompress(byte[] src,
int srcOff,
int srcLen,
byte[] dst,
int dstOff)
Decompress source data read from src and write the decompressed data to dst.
|
int |
decompress(ByteBuffer src,
int srcOff,
int srcLen,
ByteBuffer dst,
int dstOff)
Decompress source data read from (
Buffer.position() + srcOff),
and write the decompressed data to dst. |
public int decompress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dst, int dstOff) throws DataCorruptionException
BlockDecompressorBuffer.position() + srcOff),
and write the decompressed data to dst.decompress in interface BlockDecompressorsrc - Compressed data to read fromsrcOff - The start offset of compressed datasrcLen - The length of data which want to be decompresseddst - The target to write decompressed datadstOff - The start offset to write the decompressed dataDataCorruptionException - if data corruption found when decompressingpublic int decompress(byte[] src,
int srcOff,
int srcLen,
byte[] dst,
int dstOff)
throws InsufficientBufferException,
DataCorruptionException
BlockDecompressordecompress in interface BlockDecompressorsrc - Compressed data to read fromsrcOff - The start offset of compressed datasrcLen - The length of data which want to be decompresseddst - The target to write decompressed datadstOff - The start offset to write the decompressed dataInsufficientBufferException - if the target does not have sufficient spaceDataCorruptionException - if data corruption found when decompressingCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.