Class BaseZstdBufferDecompressingStreamNoFinalizer
java.lang.Object
com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer
- All Implemented Interfaces:
Closeable, AutoCloseable
- Direct Known Subclasses:
ZstdBufferDecompressingStreamNoFinalizer, ZstdDirectBufferDecompressingStreamNoFinalizer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate intprivate booleanprivate intprotected ByteBufferprotected longprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()(package private) abstract long(package private) abstract longdecompressStream(long stream, ByteBuffer dst, int dstOffset, int dstSize, ByteBuffer src, int srcOffset, int srcSize) (package private) abstract longfreeDStream(long stream) boolean(package private) abstract longinitDStream(long stream) abstract intread(ByteBuffer target) (package private) intreadInternal(ByteBuffer target, boolean isDirectBufferRequired) protected ByteBufferrefill(ByteBuffer toRefill) Override this method in case the byte buffer passed to the constructor might not contain the full compressed streamsetDict(byte[] dict) setDict(ZstdDictDecompress dict) setLongMax(int windowLogMax)
-
Field Details
-
stream
protected long stream -
source
-
closed
protected boolean closed -
finishedFrame
private boolean finishedFrame -
streamEnd
private boolean streamEnd -
consumed
private int consumed -
produced
private int produced
-
-
Constructor Details
-
BaseZstdBufferDecompressingStreamNoFinalizer
BaseZstdBufferDecompressingStreamNoFinalizer(ByteBuffer source)
-
-
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.
-
hasRemaining
public boolean hasRemaining() -
setDict
- Throws:
IOException
-
setDict
public BaseZstdBufferDecompressingStreamNoFinalizer setDict(ZstdDictDecompress dict) throws IOException - Throws:
IOException
-
setLongMax
- Throws:
IOException
-
readInternal
- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
read
- Throws:
IOException
-
createDStream
abstract long createDStream() -
freeDStream
abstract long freeDStream(long stream) -
initDStream
abstract long initDStream(long stream) -
decompressStream
abstract long decompressStream(long stream, ByteBuffer dst, int dstOffset, int dstSize, ByteBuffer src, int srcOffset, int srcSize)
-