Class Crc3

java.lang.Object
ch.qos.logback.core.kryo.Crc3

public final class Crc3 extends Object
CRC-3, polynomial x^3 + x + 1 (0b1011), init 0, MSB-first, no xorout.

Same remainder as a bit-at-a-time LFSR. Bytes use a 256-entry table plus an 8-entry “shift 8 zero bits” table so crc(C, B) = ZERO8[C] xor TABLE[B].

  • Field Details

  • Constructor Details

    • Crc3

      public Crc3()
  • Method Details

    • updateBit

      public void updateBit(int bit)
    • updateBits

      public void updateBits(int value, int nbits)
      nbits low bits of value, MSB first.
    • update

      public void update(int b)
    • update

      public void update(byte[] data, int off, int len)
    • getValue

      public int getValue()
    • reset

      public void reset()