public class SnappyCompressor extends Object implements org.apache.hadoop.io.compress.Compressor
Constructor and Description |
---|
SnappyCompressor() |
Modifier and Type | Method and Description |
---|---|
int |
compress(byte[] buffer,
int off,
int len)
Fills specified buffer with compressed data.
|
void |
end() |
void |
finish() |
boolean |
finished() |
long |
getBytesRead() |
long |
getBytesWritten() |
boolean |
needsInput() |
void |
reinit(org.apache.hadoop.conf.Configuration c) |
void |
reset() |
void |
setDictionary(byte[] dictionary,
int off,
int len) |
void |
setInput(byte[] buffer,
int off,
int len) |
public int compress(byte[] buffer, int off, int len) throws IOException
compress
in interface org.apache.hadoop.io.compress.Compressor
buffer
- Buffer for the compressed dataoff
- Start offset of the datalen
- Size of the bufferIOException
public void setInput(byte[] buffer, int off, int len)
setInput
in interface org.apache.hadoop.io.compress.Compressor
public void end()
end
in interface org.apache.hadoop.io.compress.Compressor
public void finish()
finish
in interface org.apache.hadoop.io.compress.Compressor
public boolean finished()
finished
in interface org.apache.hadoop.io.compress.Compressor
public long getBytesRead()
getBytesRead
in interface org.apache.hadoop.io.compress.Compressor
public long getBytesWritten()
getBytesWritten
in interface org.apache.hadoop.io.compress.Compressor
public boolean needsInput()
needsInput
in interface org.apache.hadoop.io.compress.Compressor
public void reinit(org.apache.hadoop.conf.Configuration c)
reinit
in interface org.apache.hadoop.io.compress.Compressor
public void reset()
reset
in interface org.apache.hadoop.io.compress.Compressor
public void setDictionary(byte[] dictionary, int off, int len)
setDictionary
in interface org.apache.hadoop.io.compress.Compressor
Copyright © 2015. All rights reserved.