Class Crc32
- java.lang.Object
-
- io.netty.handler.codec.compression.Crc32
-
final class Crc32 extends java.lang.ObjectA CRC32 calculator.
-
-
Field Summary
Fields Modifier and Type Field Description private intcrcThe current CRC.private static int[]crc32TableA static CRC lookup table.
-
Constructor Summary
Constructors Constructor Description Crc32()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCRC()voidupdateCRC(int value)Update the CRC with a single byte.voidupdateCRC(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
-
-