Class Crc32c

java.lang.Object
io.netty.handler.codec.compression.ByteBufChecksum
io.netty.handler.codec.compression.Crc32c
All Implemented Interfaces:
Checksum

class Crc32c extends ByteBufChecksum
Implements CRC32-C as defined in: "Optimization of Cyclic Redundancy-CHeck Codes with 24 and 32 Parity Bits", IEEE Transactions on Communications 41(6): 883-892 (1993). The implementation of this class has been sourced from the Appendix of RFC 3309, but with masking due to Java not being able to support unsigned types.
  • Field Details

    • CRC_TABLE

      private static final int[] CRC_TABLE
    • LONG_MASK

      private static final long LONG_MASK
      See Also:
    • BYTE_MASK

      private static final int BYTE_MASK
      See Also:
    • crc

      private int crc
  • Constructor Details

    • Crc32c

      Crc32c()
  • Method Details

    • update

      public void update(int b)
    • update

      public void update(byte[] buffer, int offset, int length)
    • getValue

      public long getValue()
    • reset

      public void reset()
    • crc32c

      private static int crc32c(int crc, int b)