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()
Gets the amount of raw or compressed bytes read by the stream.
|
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, getUncompressedCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic 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 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 java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic long getCompressedCount()
InputStreamStatisticsgetCompressedCount in interface InputStreamStatisticspublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved