Class ReplacementForCRC32
java.lang.Object
de.inetsoftware.jwebassembly.api.java.util.zip.ReplacementForCRC32
Replacement methods for the class java.util.zip.CRC32
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
init()
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)
-
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
-