public class SnappyDecompressor extends Object implements org.apache.hadoop.io.compress.Decompressor
| Constructor and Description |
|---|
SnappyDecompressor() |
| Modifier and Type | Method and Description |
|---|---|
int |
decompress(byte[] buffer,
int off,
int len)
Fills specified buffer with uncompressed data.
|
void |
end() |
boolean |
finished() |
int |
getRemaining() |
boolean |
needsDictionary() |
boolean |
needsInput() |
void |
reset() |
void |
setDictionary(byte[] b,
int off,
int len) |
void |
setInput(byte[] buffer,
int off,
int len)
Sets input data for decompression.
|
public int decompress(byte[] buffer,
int off,
int len)
throws IOException
needsInput() should be called in order to determine if more
input data is required.decompress in interface org.apache.hadoop.io.compress.Decompressorbuffer - Buffer for the compressed dataoff - Start offset of the datalen - Size of the bufferIOExceptionpublic void setInput(byte[] buffer,
int off,
int len)
needsInput() returns
true indicating that more input data is required.
(Both native and non-native versions of various Decompressors require
that the data passed in via b[] remain unmodified until
the caller is explicitly notified--via needsInput()--that the
buffer may be safely modified. With this requirement, an extra
buffer-copy can be avoided.)setInput in interface org.apache.hadoop.io.compress.Decompressorbuffer - Input dataoff - Start offsetlen - Lengthpublic void end()
end in interface org.apache.hadoop.io.compress.Decompressorpublic boolean finished()
finished in interface org.apache.hadoop.io.compress.Decompressorpublic int getRemaining()
getRemaining in interface org.apache.hadoop.io.compress.Decompressorpublic boolean needsInput()
needsInput in interface org.apache.hadoop.io.compress.Decompressorpublic void reset()
reset in interface org.apache.hadoop.io.compress.Decompressorpublic boolean needsDictionary()
needsDictionary in interface org.apache.hadoop.io.compress.Decompressorpublic void setDictionary(byte[] b,
int off,
int len)
setDictionary in interface org.apache.hadoop.io.compress.DecompressorCopyright © 2018 The Apache Software Foundation. All rights reserved.