public class ZstdOutputStream
extends java.io.FilterOutputStream
| Constructor and Description |
|---|
ZstdOutputStream(java.io.OutputStream outStream)
create a new compressing OutputStream
|
ZstdOutputStream(java.io.OutputStream outStream,
BufferPool bufferPool)
create a new compressing OutputStream
|
ZstdOutputStream(java.io.OutputStream outStream,
BufferPool bufferPool,
int level)
create a new compressing OutputStream
|
ZstdOutputStream(java.io.OutputStream outStream,
int level)
create a new compressing OutputStream
|
ZstdOutputStream(java.io.OutputStream outStream,
int level,
boolean closeFrameOnFlush)
Deprecated.
Use ZstdOutputStream() or ZstdOutputStream(level) and set the other params with the setters
|
ZstdOutputStream(java.io.OutputStream outStream,
int level,
boolean closeFrameOnFlush,
boolean useChecksums)
Deprecated.
Use ZstdOutputStream() or ZstdOutputStream(level) and set the other params with the setters
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
void |
flush()
Flushes the output
|
static long |
recommendedCOutSize() |
ZstdOutputStream |
setChecksum(boolean useChecksums)
Enable checksums for the compressed stream.
|
ZstdOutputStream |
setCloseFrameOnFlush(boolean closeOnFlush)
Enable closing the frame on flush.
|
ZstdOutputStream |
setDict(byte[] dict) |
ZstdOutputStream |
setDict(ZstdDictCompress dict) |
void |
setFinalize(boolean finalize)
Deprecated.
If you don't rely on finalizers, use `ZstdOutputStreamNoFinalizer` instead.
|
ZstdOutputStream |
setLevel(int level)
Set the compression level.
|
ZstdOutputStream |
setLong(int windowLog)
Set the Long Distance Matching.
|
ZstdOutputStream |
setWorkers(int n)
Enable use of worker threads for parallel compression.
|
void |
write(byte[] src,
int offset,
int len) |
void |
write(int i) |
public ZstdOutputStream(java.io.OutputStream outStream,
int level,
boolean closeFrameOnFlush,
boolean useChecksums)
throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream(java.io.OutputStream outStream,
int level,
boolean closeFrameOnFlush)
throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream(java.io.OutputStream outStream,
int level)
throws java.io.IOException
outStream - the stream to wraplevel - the compression leveljava.io.IOExceptionpublic ZstdOutputStream(java.io.OutputStream outStream)
throws java.io.IOException
outStream - the stream to wrapjava.io.IOExceptionpublic ZstdOutputStream(java.io.OutputStream outStream,
BufferPool bufferPool,
int level)
throws java.io.IOException
outStream - the stream to wrapbufferPool - the pool to fetch and return buffersjava.io.IOExceptionpublic ZstdOutputStream(java.io.OutputStream outStream,
BufferPool bufferPool)
throws java.io.IOException
outStream - 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 recommendedCOutSize()
public ZstdOutputStream setChecksum(boolean useChecksums) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setLevel(int level) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setLong(int windowLog) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setWorkers(int n) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setCloseFrameOnFlush(boolean closeOnFlush) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setDict(byte[] dict) throws java.io.IOException
java.io.IOExceptionpublic ZstdOutputStream setDict(ZstdDictCompress dict) throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] src,
int offset,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(int i)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOException