com.ning.compress.Uncompressor implementation for uncompressing
LZF encoded data in "push" mode, in which input is not
read using java.io.InputStream but rather pushed to
uncompressor in variable length chunks.
| Modifier and Type | Field and Description |
|---|---|
| protected int | _bytesReadFromBlock
Number of bytes that have been buffered in |
| protected int | _compressedLength
Number of bytes in current, compressed block |
| protected byte[] | _decodeBuffer
Buffer used for data uncompressed from |
| protected final ChunkDecoder | _decoder
Underlying decompressor we use for chunk decompression. |
| protected final DataHandler | _handler
Handler that will receive uncompressed data. |
| protected byte[] | _inputBuffer
Buffer in which compressed input is buffered if necessary, to get full chunks for decoding. |
| protected final BufferRecycler | |
| protected int | _state
Current decoding state, which determines meaning of following byte(s). |
| protected boolean | _terminated
Flag set if |
| protected int | _uncompressedLength
Number of bytes from current block, either after uncompressing data (for compressed blocks), or included in stream (for uncompressed). |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | STATE_INITIAL
State in which a new block or end-of-stream is expected. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private final int | |
| private final int | |
| protected void | |
| protected void | |
| private final void | |
| public void | complete()
Implements abstract com. |
| public boolean | feedCompressedData(byte[] comp, int offset, int len)
Implements abstract com. |
| _bytesReadFromBlock | back to summary |
|---|---|
| protected int _bytesReadFromBlock Number of bytes that have been buffered in | |
| _compressedLength | back to summary |
|---|---|
| protected int _compressedLength Number of bytes in current, compressed block | |
| _decodeBuffer | back to summary |
|---|---|
| protected byte[] _decodeBuffer Buffer used for data uncompressed from | |
| _decoder | back to summary |
|---|---|
| protected final ChunkDecoder _decoder Underlying decompressor we use for chunk decompression. | |
| _handler | back to summary |
|---|---|
| protected final DataHandler _handler Handler that will receive uncompressed data. | |
| _inputBuffer | back to summary |
|---|---|
| protected byte[] _inputBuffer Buffer in which compressed input is buffered if necessary, to get full chunks for decoding. | |
| _recycler | back to summary |
|---|---|
| protected final BufferRecycler _recycler | |
| _state | back to summary |
|---|---|
| protected int _state Current decoding state, which determines meaning of following byte(s). | |
| _terminated | back to summary |
|---|---|
| protected boolean _terminated Flag set if | |
| _uncompressedLength | back to summary |
|---|---|
| protected int _uncompressedLength Number of bytes from current block, either after uncompressing data (for compressed blocks), or included in stream (for uncompressed). | |
| STATE_HEADER_COMPRESSED_0 | back to summary |
|---|---|
| protected static final int STATE_HEADER_COMPRESSED_0 | |
| STATE_HEADER_COMPRESSED_1 | back to summary |
|---|---|
| protected static final int STATE_HEADER_COMPRESSED_1 | |
| STATE_HEADER_COMPRESSED_2 | back to summary |
|---|---|
| protected static final int STATE_HEADER_COMPRESSED_2 | |
| STATE_HEADER_COMPRESSED_3 | back to summary |
|---|---|
| protected static final int STATE_HEADER_COMPRESSED_3 | |
| STATE_HEADER_COMPRESSED_BUFFERING | back to summary |
|---|---|
| protected static final int STATE_HEADER_COMPRESSED_BUFFERING | |
| STATE_HEADER_UNCOMPRESSED_0 | back to summary |
|---|---|
| protected static final int STATE_HEADER_UNCOMPRESSED_0 | |
| STATE_HEADER_UNCOMPRESSED_1 | back to summary |
|---|---|
| protected static final int STATE_HEADER_UNCOMPRESSED_1 | |
| STATE_HEADER_UNCOMPRESSED_STREAMING | back to summary |
|---|---|
| protected static final int STATE_HEADER_UNCOMPRESSED_STREAMING | |
| STATE_HEADER_Z_GOTTEN | back to summary |
|---|---|
| protected static final int STATE_HEADER_Z_GOTTEN | |
| STATE_HEADER_ZV_GOTTEN | back to summary |
|---|---|
| protected static final int STATE_HEADER_ZV_GOTTEN | |
| STATE_INITIAL | back to summary |
|---|---|
| protected static final int STATE_INITIAL State in which a new block or end-of-stream is expected. | |
| LZFUncompressor | back to summary |
|---|---|
| public LZFUncompressor(DataHandler handler) | |
| LZFUncompressor | back to summary |
|---|---|
| public LZFUncompressor(DataHandler handler, BufferRecycler bufferRecycler) | |
| LZFUncompressor | back to summary |
|---|---|
| public LZFUncompressor(DataHandler handler, ChunkDecoder dec) | |
| LZFUncompressor | back to summary |
|---|---|
| public LZFUncompressor(DataHandler handler, ChunkDecoder dec, BufferRecycler bufferRecycler) | |
| _handleCompressed | back to summary |
|---|---|
| private final int _handleCompressed(byte[] comp, int offset, int end) throws IOException | |
| _handleUncompressed | back to summary |
|---|---|
| private final int _handleUncompressed(byte[] comp, int offset, int end) throws IOException | |
| _reportBadBlockType | back to summary |
|---|---|
| protected void _reportBadBlockType(byte[] comp, int nextOffset, int len, int type) throws IOException | |
| _reportBadHeader | back to summary |
|---|---|
| protected void _reportBadHeader(byte[] comp, int nextOffset, int len, int relative) throws IOException | |
| _uncompress | back to summary |
|---|---|
| private final void _uncompress(byte[] src, int srcOffset, int len) throws IOException | |
| complete | back to summary |
|---|---|
| public void complete() throws IOException Implements abstract com. Doc from com. Method called to indicate that all data to uncompress has already been fed. This typically results in last block of data being uncompressed, and results being sent to listener(s); but may also throw an exception if incomplete block was passed.
| |
| feedCompressedData | back to summary |
|---|---|
| public boolean feedCompressedData(byte[] comp, int offset, int len) throws IOException Implements abstract com. Doc from com. Method called to feed more compressed data to be uncompressed, and sent to possible listeners. Note return value was added (from void to boolean) in 0.9.9 | |