Class CRC16

java.lang.Object
com.webcodepro.shrinkit.CRC16
All Implemented Interfaces:
Checksum

public class CRC16 extends Object implements Checksum
Crc16: Calculate 16-bit Cyclic Redundancy Check. License: GPL, incorporated by reference.
  • Constructor Details

    • CRC16

      public CRC16()
  • Method Details

    • getTable

      public static int[] getTable()
    • getValue

      public long getValue()
      Specified by:
      getValue in interface Checksum
    • reset

      public void reset()
      Specified by:
      reset in interface Checksum
    • update

      public void update(int b)
      Update 16-bit CRC.
      Specified by:
      update in interface Checksum
      Parameters:
      b - input byte
    • update

      public void update(byte[] b)
      Update 16-bit CRC.
      Specified by:
      update in interface Checksum
      Parameters:
      b - input byte array
    • update

      public void update(byte[] b, int off, int len)
      Update 16-bit CRC.
      Specified by:
      update in interface Checksum
      Parameters:
      b - input byte array
      off - starting offset to data
      len - number of bytes to process