@InterfaceAudience.Private public class ZstdCompressor extends Object implements CanReinit, org.apache.hadoop.io.compress.Compressor
| Modifier and Type | Field and Description |
|---|---|
protected int |
bufferSize |
protected long |
bytesRead |
protected long |
bytesWritten |
protected com.github.luben.zstd.ZstdDictCompress |
dict |
protected int |
dictId |
protected boolean |
finish |
protected boolean |
finished |
protected ByteBuffer |
inBuf |
protected int |
level |
protected ByteBuffer |
outBuf |
| Constructor and Description |
|---|
ZstdCompressor(int level,
int bufferSize) |
ZstdCompressor(int level,
int bufferSize,
byte[] dictionary) |
| Modifier and Type | Method and Description |
|---|---|
int |
compress(byte[] b,
int off,
int len) |
void |
end() |
void |
finish() |
boolean |
finished() |
long |
getBytesRead() |
long |
getBytesWritten() |
(package private) static int |
maxCompressedLength(int len) |
boolean |
needsInput() |
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) |
protected int level
protected int bufferSize
protected ByteBuffer inBuf
protected ByteBuffer outBuf
protected boolean finish
protected boolean finished
protected long bytesRead
protected long bytesWritten
protected int dictId
protected com.github.luben.zstd.ZstdDictCompress dict
ZstdCompressor(int level, int bufferSize, byte[] dictionary)
ZstdCompressor(int level, int bufferSize)
public int compress(byte[] b, int off, int len) throws IOException
compress in interface org.apache.hadoop.io.compress.CompressorIOExceptionpublic void end()
end in interface org.apache.hadoop.io.compress.Compressorpublic void finish()
finish in interface org.apache.hadoop.io.compress.Compressorpublic boolean finished()
finished in interface org.apache.hadoop.io.compress.Compressorpublic long getBytesRead()
getBytesRead in interface org.apache.hadoop.io.compress.Compressorpublic long getBytesWritten()
getBytesWritten in interface org.apache.hadoop.io.compress.Compressorpublic boolean needsInput()
needsInput in interface org.apache.hadoop.io.compress.Compressorpublic void reinit(org.apache.hadoop.conf.Configuration conf)
public void reset()
reset in interface org.apache.hadoop.io.compress.Compressorpublic void setDictionary(byte[] b, int off, int len)
setDictionary in interface org.apache.hadoop.io.compress.Compressorpublic void setInput(byte[] b, int off, int len)
setInput in interface org.apache.hadoop.io.compress.Compressorstatic int maxCompressedLength(int len)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.