Class Crc32

java.lang.Object
io.netty.handler.codec.compression.Crc32

final class Crc32 extends Object
A CRC32 calculator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    The current CRC.
    private static final int[]
    A static CRC lookup table.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
    updateCRC(int value)
    Update the CRC with a single byte.
    void
    updateCRC(int value, int count)
    Update the CRC with a sequence of identical bytes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • crc32Table

      private static final int[] crc32Table
      A static CRC lookup table.
    • crc

      private int crc
      The current CRC.
  • Constructor Details

    • Crc32

      Crc32()
  • Method Details

    • getCRC

      public int getCRC()
      Returns:
      The current CRC.
    • updateCRC

      public void updateCRC(int value)
      Update the CRC with a single byte.
      Parameters:
      value - The value to update the CRC with
    • updateCRC

      public void updateCRC(int value, int count)
      Update the CRC with a sequence of identical bytes.
      Parameters:
      value - The value to update the CRC with
      count - The number of bytes