Class ZstdCompressWritableChunkChannel

java.lang.Object
com.e1c.g5.v8.internal.fastzip.chunk.ZstdCompressWritableChunkChannel
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, WritableByteChannel

public class ZstdCompressWritableChunkChannel extends Object implements WritableByteChannel
A channel which compresses data with Zstandard algorithm and writes it to a sequence of chunks provided by IChunkSupplier.

Due to limitations of zstd-jni the destination byte buffers provided by the chunk supplier must be direct. As any respectful channel's write, write(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.