Class LZ4.Encoder
java.lang.Object
io.activej.csp.process.frame.impl.LZ4.Encoder
- All Implemented Interfaces:
BlockEncoder
- Enclosing class:
- LZ4
-
Method Summary
Modifier and TypeMethodDescriptionio.activej.bytebuf.ByteBufencode(io.activej.bytebuf.ByteBuf inputBuf) Encodes inputByteBufas a Data Block.io.activej.bytebuf.ByteBufEncodes an End-Of-Stream Block which indicates an end of stream.voidreset()Attempts to reset some internal state of encoder.
-
Method Details
-
reset
public void reset()Description copied from interface:BlockEncoderAttempts to reset some internal state of encoder. This method is called before each call toBlockEncoder.encode(ByteBuf)(ifChannelFrameEncoderis configured to do so).- Specified by:
resetin interfaceBlockEncoder
-
encode
public io.activej.bytebuf.ByteBuf encode(io.activej.bytebuf.ByteBuf inputBuf) Description copied from interface:BlockEncoderEncodes inputByteBufas a Data Block. Input bufs are not empty. If it is the first bytebuf, encoder may encode Stream Header together with Data Block.- Specified by:
encodein interfaceBlockEncoder- Parameters:
inputBuf- buf to be encoded- Returns:
ByteBufthat contains encoded data
-
encodeEndOfStreamBlock
public io.activej.bytebuf.ByteBuf encodeEndOfStreamBlock()Description copied from interface:BlockEncoderEncodes an End-Of-Stream Block which indicates an end of stream.- Specified by:
encodeEndOfStreamBlockin interfaceBlockEncoder- Returns:
ByteBufwhich contains End-Of-Stream block
-