public final class LZ4Compressor extends ICompressor
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
COMPRESSOR_NAME |
static int |
DEFAULT_LEVEL |
static int |
MAX_LEVEL |
static int |
MIN_LEVEL |
DEFAULT
构造器和说明 |
---|
LZ4Compressor() |
LZ4Compressor(int compressionLevel) |
LZ4Compressor(int compressionLevel,
int cacheSize) |
LZ4Compressor(int compressionLevel,
edu.sysu.pmglab.container.VolumeByteStream cache) |
限定符和类型 | 方法和说明 |
---|---|
void |
close()
关闭压缩器方法
|
int |
compress(byte[] src,
int srcOffset,
int srcLength,
byte[] dst,
int dstOffset,
int dstLength)
压缩方法, 压缩 src 数据, 并写入到 dst 中
|
static edu.sysu.pmglab.container.VolumeByteStream |
compress(int compressionLevel,
byte[] src,
int offset,
int length) |
int |
getCompressBound(int length)
预估压缩后数据段大小
|
int |
getDefaultCompressionLevel()
获取默认压缩级别 (压缩参数)
|
int |
getMaxCompressionLevel()
获取最大压缩级别 (压缩参数)
|
int |
getMinCompressionLevel()
获取最小压缩级别 (压缩参数)
|
compress, compress, compress, compress, compress, compress, getCache, getCompressorIndex, getCompressorName, getCompressorNames, getDefaultCompressionLevel, getInstance, getInstance, getInstance, getMaxCompressionLevel, getMinCompressionLevel, reset
public static final int MIN_LEVEL
public static final int MAX_LEVEL
public static final int DEFAULT_LEVEL
public static final java.lang.String COMPRESSOR_NAME
public LZ4Compressor()
public LZ4Compressor(int compressionLevel)
public LZ4Compressor(int compressionLevel, int cacheSize)
public LZ4Compressor(int compressionLevel, edu.sysu.pmglab.container.VolumeByteStream cache)
public int getCompressBound(int length)
ICompressor
getCompressBound
在类中 ICompressor
length
- 输入数据长度public int getMinCompressionLevel()
ICompressor
getMinCompressionLevel
在类中 ICompressor
public int getDefaultCompressionLevel()
ICompressor
getDefaultCompressionLevel
在类中 ICompressor
public int getMaxCompressionLevel()
ICompressor
getMaxCompressionLevel
在类中 ICompressor
public int compress(byte[] src, int srcOffset, int srcLength, byte[] dst, int dstOffset, int dstLength)
ICompressor
compress
在类中 ICompressor
src
- 源数据srcOffset
- 源数据偏移量srcLength
- 源数据传入长度dst
- 目标容器dstOffset
- 目标容器偏移量dstLength
- 目标容器可用长度public void close()
ICompressor
close
在接口中 java.io.Closeable
close
在接口中 java.lang.AutoCloseable
close
在类中 ICompressor
public static edu.sysu.pmglab.container.VolumeByteStream compress(int compressionLevel, byte[] src, int offset, int length) throws java.io.IOException
java.io.IOException