public class FramedLZ4CompressorInputStream extends CompressorInputStream implements InputStreamStatistics
Based on the "spec" in the version "1.5.1 (31/03/2015)"
Constructor and Description |
---|
FramedLZ4CompressorInputStream(java.io.InputStream in)
Creates a new input stream that decompresses streams compressed
using the LZ4 frame format and stops after decompressing the
first frame.
|
FramedLZ4CompressorInputStream(java.io.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) |
getBytesRead, getCount, getUncompressedCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUncompressedCount
public FramedLZ4CompressorInputStream(java.io.InputStream in) throws java.io.IOException
in
- the InputStream from which to read the compressed datajava.io.IOException
- if reading failspublic FramedLZ4CompressorInputStream(java.io.InputStream in, boolean decompressConcatenated) throws java.io.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 streamjava.io.IOException
- if reading failspublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long getCompressedCount()
getCompressedCount
in interface InputStreamStatistics
public 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 checkCopyright © 2010 - 2020 Adobe. All Rights Reserved