Class Crc32cIntChecksum


  • public class Crc32cIntChecksum
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean acceptsMemoryAddressBuffer()  
      static int computeChecksum​(io.netty.buffer.ByteBuf payload)
      Computes crc32c checksum: if it is able to load crc32c native library then it computes using that native library which is faster as it computes using hardware machine instruction else it computes using crc32c algo.
      static int computeChecksum​(io.netty.buffer.ByteBuf payload, int offset, int len)
      Computes crc32c checksum: if it is able to load crc32c native library then it computes using that native library which is faster as it computes using hardware machine instruction else it computes using crc32c algo.
      static int resumeChecksum​(int previousChecksum, byte[] payload, int offset, int len)
      Computes incremental checksum with input previousChecksum and input payload
      static int resumeChecksum​(int previousChecksum, io.netty.buffer.ByteBuf payload)
      Computes incremental checksum with input previousChecksum and input payload
      static int resumeChecksum​(int previousChecksum, io.netty.buffer.ByteBuf payload, int offset, int len)
      Computes incremental checksum with input previousChecksum and input payload
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Crc32cIntChecksum

        public Crc32cIntChecksum()
    • Method Detail

      • computeChecksum

        public static int computeChecksum​(io.netty.buffer.ByteBuf payload)
        Computes crc32c checksum: if it is able to load crc32c native library then it computes using that native library which is faster as it computes using hardware machine instruction else it computes using crc32c algo.
        Parameters:
        payload -
        Returns:
      • computeChecksum

        public static int computeChecksum​(io.netty.buffer.ByteBuf payload,
                                          int offset,
                                          int len)
        Computes crc32c checksum: if it is able to load crc32c native library then it computes using that native library which is faster as it computes using hardware machine instruction else it computes using crc32c algo.
        Parameters:
        payload -
        Returns:
      • resumeChecksum

        public static int resumeChecksum​(int previousChecksum,
                                         io.netty.buffer.ByteBuf payload)
        Computes incremental checksum with input previousChecksum and input payload
        Parameters:
        previousChecksum - : previously computed checksum
        payload -
        Returns:
      • resumeChecksum

        public static int resumeChecksum​(int previousChecksum,
                                         io.netty.buffer.ByteBuf payload,
                                         int offset,
                                         int len)
        Computes incremental checksum with input previousChecksum and input payload
        Parameters:
        previousChecksum - the previously computed checksum
        payload - the data for which the checksum is to be computed
        offset - the starting position in the payload
        len - the number of bytes to include in the checksum computation
        Returns:
        the updated checksum
      • resumeChecksum

        public static int resumeChecksum​(int previousChecksum,
                                         byte[] payload,
                                         int offset,
                                         int len)
        Computes incremental checksum with input previousChecksum and input payload
        Parameters:
        previousChecksum - the previously computed checksum
        payload - the data for which the checksum is to be computed
        offset - the starting position in the payload
        len - the number of bytes to include in the checksum computation
        Returns:
        the updated checksum
      • acceptsMemoryAddressBuffer

        public static boolean acceptsMemoryAddressBuffer()