Class FastLzFrameDecoder

    • Field Detail

      • checksum

        private final ByteBufChecksum checksum
        Underlying checksum calculator in use.
      • chunkLength

        private int chunkLength
        Length of current received chunk of data.
      • originalLength

        private int originalLength
        Original of current received chunk of data. It is equal to chunkLength for non compressed chunks.
      • isCompressed

        private boolean isCompressed
        Indicates is this chunk compressed or not.
      • hasChecksum

        private boolean hasChecksum
        Indicates is this chunk has checksum or not.
      • currentChecksum

        private int currentChecksum
        Checksum value of current received chunk of data which has checksum.
    • 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​(java.util.zip.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.