Class ReplacementForCRC32

java.lang.Object
de.inetsoftware.jwebassembly.api.java.util.zip.ReplacementForCRC32

class ReplacementForCRC32 extends Object
Replacement methods for the class java.util.zip.CRC32
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static int[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    Replacement for static code.
    private static int[]
    Create table for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
    (package private) static int
    update(int crc, int b)
    Replacement for CRC32.update(int, int)
    (package private) static int
    updateBytes(int crc, byte[] data, int off, int len)
    Replacement for CRC32.updateBytes(int, byte[], int, int)

    Methods inherited from class java.lang.Object

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

    • cachedCrcTable

      private static int[] cachedCrcTable
  • Constructor Details

    • ReplacementForCRC32

      ReplacementForCRC32()
  • Method Details

    • init

      private static void init()
      Replacement for static code.
    • update

      static int update(int crc, int b)
      Replacement for CRC32.update(int, int)
    • updateBytes

      static int updateBytes(int crc, byte[] data, int off, int len)
      Replacement for CRC32.updateBytes(int, byte[], int, int)
    • makeCRCTable

      private static int[] makeCRCTable()
      Create table for a byte-wise 32-bit CRC calculation on the polynomial: x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
      Returns:
      the table