Class PureJavaCrc32C
java.lang.Object
org.apache.commons.compress.compressors.snappy.PureJavaCrc32C
- All Implemented Interfaces:
Checksum
A pure-java implementation of the CRC32 checksum that uses the CRC32-C polynomial, the same polynomial used by iSCSI and implemented on many Intel chipsets
supporting SSE4.2.
This file is a copy of the implementation at the Apache Hadoop project.
- Since:
- 1.7
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intthe current CRC value, bit-flippedprivate static final int[]private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
T8_0_START
private static final int T8_0_START- See Also:
-
T8_1_START
private static final int T8_1_START- See Also:
-
T8_2_START
private static final int T8_2_START- See Also:
-
T8_3_START
private static final int T8_3_START- See Also:
-
T8_4_START
private static final int T8_4_START- See Also:
-
T8_5_START
private static final int T8_5_START- See Also:
-
T8_6_START
private static final int T8_6_START- See Also:
-
T8_7_START
private static final int T8_7_START- See Also:
-
T
private static final int[] T -
crc
private int crcthe current CRC value, bit-flipped
-
-
Constructor Details
-
PureJavaCrc32C
public PureJavaCrc32C()Create a new PureJavaCrc32 object.
-
-
Method Details
-
getValue
public long getValue() -
reset
public void reset()Called by ctor but the class is final so this is safe. -
update
public void update(byte[] b, int off, int len) -
update
public void update(int b)
-