Package com.github.luben.zstd
Class ZstdDirectBufferCompressingStreamNoFinalizer
java.lang.Object
com.github.luben.zstd.ZstdDirectBufferCompressingStreamNoFinalizer
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcompress(ByteBuffer source) voidflush()protected ByteBufferflushBuffer(ByteBuffer toFlush) This method should flush the buffer and either return the same buffer (but cleared) or a new buffer that should be used from then on.static intsetDict(byte[] dict) setDict(ZstdDictCompress dict)
-
Constructor Details
-
ZstdDirectBufferCompressingStreamNoFinalizer
public ZstdDirectBufferCompressingStreamNoFinalizer(ByteBuffer target, int level) throws IOException - Throws:
IOException
-
-
Method Details
-
flushBuffer
This method should flush the buffer and either return the same buffer (but cleared) or a new buffer that should be used from then on.- Parameters:
toFlush- buffer that has to be flushed (or most cases, you want to callBuffer.flip()first)- Returns:
- the new buffer to use, for most cases the same as the one passed in, after a call to
Buffer.clear(). - Throws:
IOException
-
recommendedOutputBufferSize
public static int recommendedOutputBufferSize() -
setDict
-
setDict
-
compress
- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-