Package com.github.luben.zstd
Class ZstdInputStreamNoFinalizer
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.github.luben.zstd.ZstdInputStreamNoFinalizer
- All Implemented Interfaces:
Closeable,AutoCloseable
InputStream filter that decompresses the data provided
by the underlying InputStream using Zstd compression.
It does not support mark/reset methods. It also does not have finalizer,
so if you rely on finalizers to clean the native memory and release
buffers use `ZstdInputStream` instead.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionZstdInputStreamNoFinalizer(InputStream inStream) create a new decompressing InputStreamZstdInputStreamNoFinalizer(InputStream inStream, BufferPool bufferPool) create a new decompressing InputStream -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()booleanbooleanintread()intread(byte[] dst, int offset, int len) static longstatic longsetContinuous(boolean b) Don't break on unfinished frames Use case: decompressing files that are not yet finished writing and compressingsetDict(byte[] dict) setDict(ZstdDictDecompress dict) setLongMax(int windowLogMax) setRefMultipleDDicts(boolean useMultiple) longskip(long numBytes) Methods inherited from class java.io.FilterInputStream
mark, read, reset
-
Constructor Details
-
ZstdInputStreamNoFinalizer
create a new decompressing InputStream- Parameters:
inStream- the stream to wrap- Throws:
IOException
-
ZstdInputStreamNoFinalizer
create a new decompressing InputStream- Parameters:
inStream- the stream to wrapbufferPool- the pool to fetch and return buffers- Throws:
IOException
-
-
Method Details
-
recommendedDInSize
public static long recommendedDInSize() -
recommendedDOutSize
public static long recommendedDOutSize() -
setContinuous
Don't break on unfinished frames Use case: decompressing files that are not yet finished writing and compressing -
getContinuous
public boolean getContinuous() -
setDict
- Throws:
IOException
-
setDict
- Throws:
IOException
-
setLongMax
- Throws:
IOException
-
setRefMultipleDDicts
- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classFilterInputStream
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-