public class ZstdInputStream
extends java.io.FilterInputStream
| Constructor and Description |
|---|
ZstdInputStream(java.io.InputStream inStream)
create a new decompressing InputStream
|
ZstdInputStream(java.io.InputStream inStream,
BufferPool bufferPool)
create a new decompressing InputStream
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
protected void |
finalize() |
boolean |
getContinuous() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] dst,
int offset,
int len) |
static long |
recommendedDInSize() |
static long |
recommendedDOutSize() |
ZstdInputStream |
setContinuous(boolean b)
Don't break on unfinished frames
Use case: decompressing files that are not yet finished writing and compressing
|
ZstdInputStream |
setDict(byte[] dict) |
ZstdInputStream |
setDict(ZstdDictDecompress dict) |
void |
setFinalize(boolean finalize)
Deprecated.
If you don't rely on finalizers, use `ZstdInputStreamNoFinalizer` instead, instances of
`ZstdInputStream` will always try to close/release in the finalizer.
|
long |
skip(long numBytes) |
public ZstdInputStream(java.io.InputStream inStream)
throws java.io.IOException
inStream - the stream to wrapjava.io.IOExceptionpublic ZstdInputStream(java.io.InputStream inStream,
BufferPool bufferPool)
throws java.io.IOException
inStream - the stream to wrapbufferPool - the pool to fetch and return buffersjava.io.IOExceptionpublic void setFinalize(boolean finalize)
finalize - default `true` - finalizers are enabledprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic static long recommendedDInSize()
public static long recommendedDOutSize()
public ZstdInputStream setContinuous(boolean b)
public boolean getContinuous()
public ZstdInputStream setDict(byte[] dict) throws java.io.IOException
java.io.IOExceptionpublic ZstdInputStream setDict(ZstdDictDecompress dict) throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] dst,
int offset,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOExceptionpublic long skip(long numBytes)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.FilterInputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOException