Class ZstdCompressorInputStream
java.lang.Object
java.io.InputStream
kala.compress.compressors.CompressorInputStream
kala.compress.compressors.zstandard.ZstdCompressorInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,InputStreamStatistics
public class ZstdCompressorInputStream
extends CompressorInputStream
implements InputStreamStatistics
CompressorInputStream implementation to decode Zstandard encoded stream. Library relies on Zstandard
JNI- Since:
- 1.16
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CountingInputStreamprivate final com.github.luben.zstd.ZstdInputStream -
Constructor Summary
ConstructorsConstructorDescriptionZstdCompressorInputStream(InputStream in, com.github.luben.zstd.BufferPool bufferPool) Creates a new input stream that decompresses zstd-compressed data from the specific input stream -
Method Summary
Methods inherited from class kala.compress.compressors.CompressorInputStream
count, count, getBytesRead, getUncompressedCount, pushedBackBytesMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface kala.compress.utils.InputStreamStatistics
getUncompressedCount
-
Field Details
-
countingStream
-
decIS
private final com.github.luben.zstd.ZstdInputStream decIS
-
-
Constructor Details
-
ZstdCompressorInputStream
- Throws:
IOException
-
ZstdCompressorInputStream
public ZstdCompressorInputStream(InputStream in, com.github.luben.zstd.BufferPool bufferPool) throws IOException Creates a new input stream that decompresses zstd-compressed data from the specific input stream- Parameters:
in- the input stream of compressed databufferPool- a configuration of zstd-jni that allows users to customize how buffers are recycled. Either aNoPoolor aRecyclingBufferPoolis allowed here.- Throws:
IOException- if an IO error occurs.
-
-
Method Details
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
getCompressedCount
public long getCompressedCount()Description copied from interface:InputStreamStatisticsGets the amount of raw or compressed bytes read by the stream.- Specified by:
getCompressedCountin interfaceInputStreamStatistics- Returns:
- the amount of raw or compressed bytes read by the stream.
- Since:
- 1.17
-
mark
public void mark(int readLimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
toString
-