public class FramedLZ4CompressorInputStream extends CompressorInputStream implements InputStreamStatistics
Based on the "spec" in the version "1.5.1 (31/03/2015)"
| Constructor and Description |
|---|
FramedLZ4CompressorInputStream(InputStream in)
Creates a new input stream that decompresses streams compressed
using the LZ4 frame format and stops after decompressing the
first frame.
|
FramedLZ4CompressorInputStream(InputStream in,
boolean decompressConcatenated)
Creates a new input stream that decompresses streams compressed
using the LZ4 frame format.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getCompressedCount() |
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a .lz4 file.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytesavailable, mark, markSupported, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic FramedLZ4CompressorInputStream(InputStream in) throws IOException
in - the InputStream from which to read the compressed dataIOException - if reading failspublic FramedLZ4CompressorInputStream(InputStream in, boolean decompressConcatenated) throws IOException
in - the InputStream from which to read the compressed datadecompressConcatenated - if true, decompress until the end
of the input; if false, stop after the first LZ4 frame
and leave the input position to point to the next byte
after the frame streamIOException - if reading failspublic static boolean matches(byte[] signature, int length)
.lz4 files start with a four byte signature.
signature - the bytes to checklength - the number of bytes to checkpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic long getCompressedCount()
getCompressedCount in interface InputStreamStatisticspublic int read() throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b, int off, int len) throws IOException
read in class InputStreamIOExceptionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.