Package com.github.luben.zstd
Class BaseZstdBufferDecompressingStreamNoFinalizer
- java.lang.Object
-
- com.github.luben.zstd.BaseZstdBufferDecompressingStreamNoFinalizer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
ZstdBufferDecompressingStreamNoFinalizer
,ZstdDirectBufferDecompressingStreamNoFinalizer
public abstract class BaseZstdBufferDecompressingStreamNoFinalizer extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description BaseZstdBufferDecompressingStreamNoFinalizer(java.nio.ByteBuffer source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
(package private) abstract long
createDStream()
(package private) abstract long
decompressStream(long stream, java.nio.ByteBuffer dst, int dstOffset, int dstSize, java.nio.ByteBuffer src, int srcOffset, int srcSize)
(package private) abstract long
freeDStream(long stream)
boolean
hasRemaining()
(package private) abstract long
initDStream(long stream)
abstract int
read(java.nio.ByteBuffer target)
(package private) int
readInternal(java.nio.ByteBuffer target, boolean isDirectBufferRequired)
protected java.nio.ByteBuffer
refill(java.nio.ByteBuffer toRefill)
Override this method in case the byte buffer passed to the constructor might not contain the full compressed streamBaseZstdBufferDecompressingStreamNoFinalizer
setDict(byte[] dict)
BaseZstdBufferDecompressingStreamNoFinalizer
setDict(ZstdDictDecompress dict)
BaseZstdBufferDecompressingStreamNoFinalizer
setLongMax(int windowLogMax)
-
-
-
Method Detail
-
refill
protected java.nio.ByteBuffer refill(java.nio.ByteBuffer toRefill)
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
public BaseZstdBufferDecompressingStreamNoFinalizer setDict(byte[] dict) throws java.io.IOException
- Throws:
java.io.IOException
-
setDict
public BaseZstdBufferDecompressingStreamNoFinalizer setDict(ZstdDictDecompress dict) throws java.io.IOException
- Throws:
java.io.IOException
-
setLongMax
public BaseZstdBufferDecompressingStreamNoFinalizer setLongMax(int windowLogMax) throws java.io.IOException
- Throws:
java.io.IOException
-
readInternal
int readInternal(java.nio.ByteBuffer target, boolean isDirectBufferRequired) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
read
public abstract int read(java.nio.ByteBuffer target) throws java.io.IOException
- Throws:
java.io.IOException
-
createDStream
abstract long createDStream()
-
freeDStream
abstract long freeDStream(long stream)
-
initDStream
abstract long initDStream(long stream)
-
decompressStream
abstract long decompressStream(long stream, java.nio.ByteBuffer dst, int dstOffset, int dstSize, java.nio.ByteBuffer src, int srcOffset, int srcSize)
-
-