Class Crc32
java.lang.Object
io.netty.handler.codec.compression.Crc32
A CRC32 calculator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The current CRC.private static final int[]
A static CRC lookup table. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
crc32Table
private static final int[] crc32TableA static CRC lookup table. -
crc
private int crcThe current CRC.
-
-
Constructor Details
-
Crc32
Crc32()
-
-
Method Details
-
getCRC
public int getCRC()- Returns:
- The current CRC.
-
updateCRC
public void updateCRC(int value) Update the CRC with a single byte.- Parameters:
value
- The value to update the CRC with
-
updateCRC
public void updateCRC(int value, int count) Update the CRC with a sequence of identical bytes.- Parameters:
value
- The value to update the CRC withcount
- The number of bytes
-