Class BlockLZ4CompressorInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.compress.compressors.CompressorInputStream
org.apache.commons.compress.compressors.lz77support.AbstractLZ77CompressorInputStream
org.apache.commons.compress.compressors.lz4.BlockLZ4CompressorInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,InputStreamStatistics
CompressorInputStream for the LZ4 block format.
- Since:
- 1.14
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
private int
Back-Reference-size part of the block starting byte.(package private) static final int
Current state of the stream(package private) static final int
Fields inherited from class org.apache.commons.compress.compressors.lz77support.AbstractLZ77CompressorInputStream
supplier
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LZ4 input stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
int
read
(byte[] b, int off, int len) private long
private void
Methods inherited from class org.apache.commons.compress.compressors.lz77support.AbstractLZ77CompressorInputStream
available, close, getCompressedCount, getSize, hasMoreDataInBlock, prefill, read, readBackReference, readLiteral, readOneByte, startBackReference, startLiteral
Methods inherited from class org.apache.commons.compress.compressors.CompressorInputStream
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytes
Methods inherited from class java.io.InputStream
mark, markSupported, read, readAllBytes, readNBytes, reset, skip, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.compress.utils.InputStreamStatistics
getUncompressedCount
-
Field Details
-
WINDOW_SIZE
static final int WINDOW_SIZE- See Also:
-
SIZE_BITS
static final int SIZE_BITS- See Also:
-
BACK_REFERENCE_SIZE_MASK
static final int BACK_REFERENCE_SIZE_MASK- See Also:
-
LITERAL_SIZE_MASK
static final int LITERAL_SIZE_MASK- See Also:
-
nextBackReferenceSize
private int nextBackReferenceSizeBack-Reference-size part of the block starting byte. -
state
Current state of the stream
-
-
Constructor Details
-
BlockLZ4CompressorInputStream
Creates a new LZ4 input stream.- Parameters:
is
- An InputStream to read compressed data from- Throws:
IOException
- if reading fails
-
-
Method Details
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readSizes
- Throws:
IOException
-
readSizeBytes
- Throws:
IOException
-
initializeBackReference
- Returns:
- false if there is no more back-reference - this means this is the last block of the stream.
- Throws:
IOException
-