Package com.github.luben.zstd
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 boolean
private int
private boolean
private int
protected ByteBuffer
protected long
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
(package private) abstract long
(package private) abstract long
decompressStream
(long stream, ByteBuffer dst, int dstOffset, int dstSize, ByteBuffer src, int srcOffset, int srcSize) (package private) abstract long
freeDStream
(long stream) boolean
(package private) abstract long
initDStream
(long stream) abstract int
read
(ByteBuffer target) (package private) int
readInternal
(ByteBuffer target, boolean isDirectBufferRequired) protected ByteBuffer
refill
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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)
-