Decompressorpublic class Lz4Decompressor extends java.lang.Object implements Decompressor
Decompressor based on the lz4 compression algorithm.
http://code.google.com/p/lz4/| Constructor | Description |
|---|---|
Lz4Decompressor() |
Creates a new decompressor with the default buffer size.
|
Lz4Decompressor(int directBufferSize) |
Creates a new compressor.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
decompress(byte[] b,
int off,
int len) |
Fills specified buffer with uncompressed data.
|
void |
end() |
Resets decompressor and input and output buffers so that a new set of
input data can be processed.
|
boolean |
finished() |
Returns true if the end of the decompressed
data output stream has been reached.
|
int |
getRemaining() |
Returns
0. |
boolean |
needsDictionary() |
Returns
false. |
boolean |
needsInput() |
Returns true if the input data buffer is empty and
setInput(byte[], int, int) should be called to
provide more input. |
void |
reset() |
Resets decompressor and input and output buffers so that a new set of
input data can be processed.
|
void |
setDictionary(byte[] b,
int off,
int len) |
Does nothing.
|
void |
setInput(byte[] b,
int off,
int len) |
Sets input data for decompression.
|
public Lz4Decompressor(int directBufferSize)
directBufferSize - size of the direct buffer to be used.public Lz4Decompressor()
public void setInput(byte[] b,
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 Decompressorb - Input dataoff - Start offsetlen - Lengthpublic void setDictionary(byte[] b,
int off,
int len)
setDictionary in interface Decompressorb - Dictionary data bytesoff - Start offsetlen - Lengthpublic boolean needsInput()
setInput(byte[], int, int) should be called to
provide more input.needsInput in interface Decompressortrue if the input data buffer is empty and
setInput(byte[], int, int) should be called in
order to provide more input.public boolean needsDictionary()
false.needsDictionary in interface Decompressorfalse.public boolean finished()
finished in interface Decompressortrue if the end of the decompressed
data output stream has been reached.public int decompress(byte[] b,
int off,
int len)
throws java.io.IOException
needsInput() should be called in order to determine if more
input data is required.decompress in interface Decompressorb - Buffer for the compressed dataoff - Start offset of the datalen - Size of the bufferjava.io.IOException - raised on errors performing I/O.public int getRemaining()
0.getRemaining in interface Decompressor0.public void reset()
DecompressorDecompressor.finished()} returns
true and Decompressor.getRemaining() returns a positive value,
reset() is called before processing of the next data stream in the
concatenated data stream. Decompressor.finished() will be reset and will
return false when reset() is called.reset in interface Decompressorpublic void end()
end in interface DecompressorCopyright © 2008–2025 Apache Software Foundation. All rights reserved.