Class LZ4Legacy.Decoder

java.lang.Object
io.activej.csp.process.frame.impl.LZ4Legacy.Decoder
All Implemented Interfaces:
BlockDecoder
Enclosing class:
LZ4Legacy

@Deprecated public static final class LZ4Legacy.Decoder extends Object implements BlockDecoder
Deprecated.
  • Method Details

    • reset

      public void reset()
      Deprecated.
      Description copied from interface: BlockDecoder
      Attempts to reset some internal state of decoder. This method is called after each successfully decoded block (if ChannelFrameDecoder is configured to do so).
      Specified by:
      reset in interface BlockDecoder
    • decode

      @Nullable public @Nullable io.activej.bytebuf.ByteBuf decode(io.activej.bytebuf.ByteBufs bufs) throws io.activej.common.exception.MalformedDataException
      Deprecated.
      Description copied from interface: BlockDecoder
      Attempts to decode data blocks contained in a ByteBufs.

      Decoder is forbidden to consume any bytes from bufs if it has not yet determined that encoded data corresponds to decoder's format

      Specified by:
      decode in interface BlockDecoder
      Parameters:
      bufs - queue that contains encoded data
      Returns:
      a ByteBuf that contains successfully decoded data or null which indicates that there are not enough data in bufs for a block to be decoded.

      If this method returns BlockDecoder.END_OF_STREAM it indicates that end of stream has been reached and no more data is expected.

      Throws:
      io.activej.common.exception.UnknownFormatException - if data is encoded using unknown format
      io.activej.common.exception.MalformedDataException - if data is malformed
    • ignoreMissingEndOfStreamBlock

      public boolean ignoreMissingEndOfStreamBlock()
      Deprecated.
      Description copied from interface: BlockDecoder
      Whether this decoder allows stream to end without End-Of-Stream Block.

      Stream still has to end with a valid complete Data Block (or be empty) and should not have any trailing data after the last block

      Specified by:
      ignoreMissingEndOfStreamBlock in interface BlockDecoder
      Returns:
      whether decoder supports missing End-Of-Stream Blocks