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.Decompressor
buffer
- Buffer for the compressed dataoff
- Start offset of the datalen
- Size of the bufferIOException
public 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.Decompressor
buffer
- Input dataoff
- Start offsetlen
- Lengthpublic void end()
end
in interface org.apache.hadoop.io.compress.Decompressor
public boolean finished()
finished
in interface org.apache.hadoop.io.compress.Decompressor
public int getRemaining()
getRemaining
in interface org.apache.hadoop.io.compress.Decompressor
public boolean needsInput()
needsInput
in interface org.apache.hadoop.io.compress.Decompressor
public void reset()
reset
in interface org.apache.hadoop.io.compress.Decompressor
public boolean needsDictionary()
needsDictionary
in interface org.apache.hadoop.io.compress.Decompressor
public void setDictionary(byte[] b, int off, int len)
setDictionary
in interface org.apache.hadoop.io.compress.Decompressor
Copyright © 2015. All rights reserved.