public class ZstdBlockCompressor extends Object implements BlockCompressor
BlockCompressor
for zstd.Constructor and Description |
---|
ZstdBlockCompressor(int level) |
Modifier and Type | Method and Description |
---|---|
int |
compress(byte[] src,
int srcOff,
int srcLen,
byte[] dst,
int dstOff)
Compress data read from src, and write the compressed data to dst.
|
int |
getMaxCompressedSize(int srcSize)
Get the max compressed size for a given original size.
|
public int getMaxCompressedSize(int srcSize)
BlockCompressor
getMaxCompressedSize
in interface BlockCompressor
public int compress(byte[] src, int srcOff, int srcLen, byte[] dst, int dstOff) throws BufferCompressionException
BlockCompressor
compress
in interface BlockCompressor
src
- Uncompressed data to read fromsrcOff
- The start offset of uncompressed datasrcLen
- The length of data which want to be compresseddst
- The target to write compressed datadstOff
- The start offset to write the compressed dataBufferCompressionException
- if exception thrown when compressingCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.