Domanda

I need to use a different polynomial for JAVA's CRC32 implementation. I need to use CRC32Q, whose polynomial is 0x814141AB.

Is there any way to change the used polynomial, maybe extending the java.util.zip.CRC32 class?

È stato utile?

Soluzione

The CRC calculation is a native method (see grepcode) and there does not appear to be any way of plugging in a different implementation. You likely will have to write your own class implementing the Checksum interface. It will probably be a lot slower.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top