Class ZstdBufferDecompressingStream
java.lang.Object
com.github.luben.zstd.ZstdBufferDecompressingStream
- 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 ZstdBufferDecompressingStreamsetDict(byte @NotNull [] dict) @NotNull ZstdBufferDecompressingStreamsetDict(@NotNull ZstdDictDecompress dict) voidsetFinalize(boolean finalize) Enable or disable class finalizers@NotNull ZstdBufferDecompressingStreamsetLongMax(int windowLogMax)
-
Constructor Details
-
ZstdBufferDecompressingStream
-
-
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 finalizersIf 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 ZstdBufferDecompressingStream setDict(byte @NotNull [] dict) throws IOException - Throws:
IOException
-
setDict
@NotNull public @NotNull ZstdBufferDecompressingStream setDict(@NotNull @NotNull ZstdDictDecompress dict) throws IOException - Throws:
IOException
-
setLongMax
@NotNull public @NotNull ZstdBufferDecompressingStream setLongMax(int windowLogMax) throws IOException - Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
finalize
-