Class Crc32c
- java.lang.Object
-
- io.netty.handler.codec.compression.ByteBufChecksum
-
- io.netty.handler.codec.compression.Crc32c
-
- All Implemented Interfaces:
java.util.zip.Checksum
class Crc32c extends ByteBufChecksum
Implements CRC32-C as defined in: "Optimization of Cyclic Redundancy-CHeck Codes with 24 and 32 Parity Bits", IEEE Transactions on Communications 41(6): 883-892 (1993). The implementation of this class has been sourced from the Appendix of RFC 3309, but with masking due to Java not being able to support unsigned types.
-
-
Constructor Summary
Constructors Constructor Description Crc32c()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
crc32c(int crc, int b)
long
getValue()
void
reset()
void
update(byte[] buffer, int offset, int length)
void
update(int b)
-
Methods inherited from class io.netty.handler.codec.compression.ByteBufChecksum
update, wrapChecksum
-
-
-
-
Field Detail
-
CRC_TABLE
private static final int[] CRC_TABLE
-
LONG_MASK
private static final long LONG_MASK
- See Also:
- Constant Field Values
-
BYTE_MASK
private static final int BYTE_MASK
- See Also:
- Constant Field Values
-
crc
private int crc
-
-