Class ZstdCompressor
java.lang.Object
org.apache.hadoop.hbase.io.compress.zstd.ZstdCompressor
- All Implemented Interfaces:
CanReinit
,org.apache.hadoop.io.compress.Compressor
@Private
public class ZstdCompressor
extends Object
implements CanReinit, org.apache.hadoop.io.compress.Compressor
Hadoop compressor glue for zstd-jni.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected long
protected long
protected com.github.luben.zstd.ZstdCompressCtx
protected com.github.luben.zstd.ZstdDictCompress
protected int
protected boolean
protected boolean
protected ByteBuffer
protected int
protected ByteBuffer
-
Constructor Summary
ConstructorDescriptionZstdCompressor
(int level, int bufferSize) ZstdCompressor
(int level, int bufferSize, byte[] dictionary) -
Method Summary
Modifier and TypeMethodDescriptionint
compress
(byte[] b, int off, int len) void
end()
void
finish()
boolean
finished()
long
long
(package private) static int
maxCompressedLength
(int len) boolean
void
reinit
(org.apache.hadoop.conf.Configuration conf) void
reset()
void
setDictionary
(byte[] b, int off, int len) void
setInput
(byte[] b, int off, int len)
-
Field Details
-
level
-
bufferSize
-
inBuf
-
outBuf
-
finish
-
finished
-
bytesRead
-
bytesWritten
-
dictId
-
dict
-
ctx
-
-
Constructor Details
-
ZstdCompressor
ZstdCompressor(int level, int bufferSize, byte[] dictionary) -
ZstdCompressor
ZstdCompressor(int level, int bufferSize)
-
-
Method Details
-
compress
- Specified by:
compress
in interfaceorg.apache.hadoop.io.compress.Compressor
- Throws:
IOException
-
end
- Specified by:
end
in interfaceorg.apache.hadoop.io.compress.Compressor
-
finish
- Specified by:
finish
in interfaceorg.apache.hadoop.io.compress.Compressor
-
finished
- Specified by:
finished
in interfaceorg.apache.hadoop.io.compress.Compressor
-
getBytesRead
- Specified by:
getBytesRead
in interfaceorg.apache.hadoop.io.compress.Compressor
-
getBytesWritten
- Specified by:
getBytesWritten
in interfaceorg.apache.hadoop.io.compress.Compressor
-
needsInput
- Specified by:
needsInput
in interfaceorg.apache.hadoop.io.compress.Compressor
-
reinit
-
reset
- Specified by:
reset
in interfaceorg.apache.hadoop.io.compress.Compressor
-
setDictionary
- Specified by:
setDictionary
in interfaceorg.apache.hadoop.io.compress.Compressor
-
setInput
- Specified by:
setInput
in interfaceorg.apache.hadoop.io.compress.Compressor
-
maxCompressedLength
-