Class FastLzFrameDecoder

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class FastLzFrameDecoder
    extends ByteToMessageDecoder
    Uncompresses a ByteBuf encoded by FastLzFrameEncoder using the FastLZ algorithm. See FastLZ format.
    • Constructor Detail

      • FastLzFrameDecoder

        public FastLzFrameDecoder()
        Creates the fastest FastLZ decoder without checksum calculation.
      • FastLzFrameDecoder

        public FastLzFrameDecoder​(boolean validateChecksums)
        Creates a FastLZ decoder with calculation of checksums as specified.
        Parameters:
        validateChecksums - If true, the checksum field will be validated against the actual uncompressed data, and if the checksums do not match, a suitable DecompressionException will be thrown. Note, that in this case decoder will use Adler32 as a default checksum calculator.
      • FastLzFrameDecoder

        public FastLzFrameDecoder​(Checksum checksum)
        Creates a FastLZ decoder with specified checksum calculator.
        Parameters:
        checksum - the Checksum instance to use to check data for integrity. You may set null if you do not want to validate checksum of each block.
    • Method Detail

      • decode

        protected void decode​(io.netty.channel.ChannelHandlerContext ctx,
                              io.netty.buffer.ByteBuf in,
                              List<Object> out)
                       throws Exception
        Description copied from class: ByteToMessageDecoder
        Decode the from one ByteBuf to an other. This method will be called till either the input ByteBuf has nothing to read when return from this method or till nothing was read from the input ByteBuf.
        Specified by:
        decode in class ByteToMessageDecoder
        Parameters:
        ctx - the ChannelHandlerContext which this ByteToMessageDecoder belongs to
        in - the ByteBuf from which to read data
        out - the List to which decoded messages should be added
        Throws:
        Exception - is thrown if an error occurs