Class ZstdDirectBufferDecompressingStream
java.lang.Object
com.github.luben.zstd.ZstdDirectBufferDecompressingStream
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()booleanintread(@NotNull ByteBuffer target) static intprotected @NotNull ByteBufferrefill(@NotNull ByteBuffer toRefill) Override this method in case the byte buffer passed to the constructor might not contain the full compressed stream@NotNull ZstdDirectBufferDecompressingStreamsetDict(byte @NotNull [] dict) @NotNull ZstdDirectBufferDecompressingStreamsetDict(@NotNull ZstdDictDecompress dict) voidsetFinalize(boolean finalize) Enable or disable class finalizers If finalizers are disabled the responsibility fir calling the `close` method is on the consumer.@NotNull ZstdDirectBufferDecompressingStreamsetLongMax(int windowLogMax)
-
Constructor Details
-
ZstdDirectBufferDecompressingStream
-
-
Method Details
-
refill
Override this method in case the byte buffer passed to the constructor might not contain the full compressed stream- Parameters:
toRefill- current buffer- Returns:
- either the current buffer (but refilled and flipped if there was new content) or a new buffer.
-
setFinalize
public void setFinalize(boolean finalize) Enable or disable class finalizers If finalizers are disabled the responsibility fir calling the `close` method is on the consumer.- Parameters:
finalize- default `true` - finalizers are enabled
-
hasRemaining
public boolean hasRemaining() -
recommendedTargetBufferSize
public static int recommendedTargetBufferSize() -
setDict
@NotNull public @NotNull ZstdDirectBufferDecompressingStream setDict(byte @NotNull [] dict) throws IOException - Throws:
IOException
-
setDict
@NotNull public @NotNull ZstdDirectBufferDecompressingStream setDict(@NotNull @NotNull ZstdDictDecompress dict) throws IOException - Throws:
IOException
-
setLongMax
@NotNull public @NotNull ZstdDirectBufferDecompressingStream setLongMax(int windowLogMax) throws IOException - Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
finalize
-