Class Crc32
- java.lang.Object
-
- io.netty.handler.codec.compression.Crc32
-
final class Crc32 extends java.lang.Object
A CRC32 calculator.
-
-
Field Summary
Fields Modifier and Type Field Description private int
crc
The current CRC.private static int[]
crc32Table
A static CRC lookup table.
-
Constructor Summary
Constructors Constructor Description Crc32()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCRC()
void
updateCRC(int value)
Update the CRC with a single byte.void
updateCRC(int value, int count)
Update the CRC with a sequence of identical bytes.
-
-
-
Method Detail
-
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
-
-