Class ZstdDecompressReadableChunkChannel
java.lang.Object
com.e1c.g5.v8.internal.fastzip.chunk.ZstdDecompressReadableChunkChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel
A channel which reads Zstandard compressed data from a sequence of chunks provided by
IChunkSupplier
and decompresses it.
The source data must originate from ZstdCompressWritableChunkChannel. Chunk bounds must be preserved.
Due to limitations of zstd-jni the source byte buffers provided by the chunk supplier
must be direct. As any respectful channel's read, read(ByteBuffer) of this channel accepts indirect
byte buffers as well as direct ones, but a slight performance penalty is expected for indirect byte buffers
because of additional coping.
-
Constructor Summary
ConstructorsConstructorDescriptionZstdDecompressReadableChunkChannel(IChunkSupplier chunkSupplier) Constructs a new channel. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()final booleanisOpen()intread(ByteBuffer dst)
-
Constructor Details
-
ZstdDecompressReadableChunkChannel
Constructs a new channel.- Parameters:
chunkSupplier- the chunk supplier, must provide direct byte buffers, cannot benull
-
-
Method Details
-
read
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
isOpen
public final boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-