Cyclic redundancy check. An error checking mechanism used for verifying data integrity in serial protocols.
Questions tagged [crc]
1120 questions
5
votes
3 answers
Algorithm for hash/crc of unordered multiset
Let's say I would like to create a unordered set of unordered multisets of unsigned int. For this, I need to create a hash function to calculate a hash of the unordered multiset. In fact, it has to be good for CRC as well.
One obvious solution is to…

gsf
- 6,612
- 7
- 35
- 64
5
votes
5 answers
Best way to test CRC logic?
How can I verify two CRC implementations will generate the same checksums?
I'm looking for an exhaustive implementation evaluating methodology specific to CRC.

Joseph Weissman
- 5,697
- 5
- 46
- 75
5
votes
2 answers
Python gzip CRC check failed
I have a folder with huge text files. Each one is gzipped and weighs several Giga byte.
I wrote a piece of code to split the content of each gzip file: each gzip file is open with gzip, then every specified chunk of line is read and written to a new…

kaligne
- 3,098
- 9
- 34
- 60
5
votes
2 answers
How to recalculate a CRC32 on a large byte array when replacing a small number of bytes
I have a problem where as input I have a large byte array (typically >1K length) which has a computed CRC32. I need to replace a small chunk of the array with different values, and recalculate the CRC. Is there an efficient way to do this without…

R. Vreeland
- 51
- 1
- 3
5
votes
2 answers
How to Determine Which CRC to Use?
If I have a certain number of bytes to transfer serially, how do I determine which CRC (CRC8, CRC16, etc., basically a how many bit CRC?) to use and still have error detection percentage be high? Is there a formula for this?

djpark121
- 1,191
- 3
- 10
- 5
5
votes
9 answers
How could I guess a checksum algorithm?
How can I figure out the CRC algorithm if a given code + CRC string is given?
I have got several strings consisting of code + matching CRCs but don't know how to calculate the CRC in question so that I could produce more code strings. Here are some…
Tom
5
votes
4 answers
ios - How to calculate CRC-8-Dallas/Maxim of NSData?
I need to calculate exactly CRC-8-Dallas/Maxim. Can someone provide an algorithm?
Any help is appreciated!

stsmkrv
- 136
- 1
- 2
- 8
5
votes
2 answers
_mm_crc32_u8 gives different result than reference code
I've been struggling with the intrinsics. In particular I don't get the same results using the standard CRC calculation and the supposedly equivalent intel intrinsics. I'd like to move to using _mm_crc32_u16, and _mm_crc32_u32 but if I can't get the…

David Larson
- 51
- 3
5
votes
3 answers
Find out CRC or CHECKSUM of RS232 data
I need to communicate with a RS232 device, I have no specs or information available.
I send a 16 byte command and get a 16 byte result back. The last byte looks like some kind of crc or checksum, I have tried using this…

Carlos Alloatti
- 193
- 2
- 9
5
votes
1 answer
Prove the linearity for CRC
I know that CRC is a linear function which means CRC(x xor y) = CRC(x) xor CRC(y), but I don't know how to prove this property for CRC.
Does anyone have any idea?
Thanks a lot!

user1995098
- 183
- 1
- 10
5
votes
3 answers
CCITT CRC 16 Bit Start Value 0xffff
I need to calculate a CCITT 16 bit checksum value for data passed as a parameter together with the length. If I fill my array TempStr with the test data "123456789", use the polynomial 0x8408 with the length excluding the null termination character,…

Ruaan Volschenk
- 717
- 2
- 11
- 23
5
votes
4 answers
CRC test vectors for CRC16 (CCITT)
Does anyone know of some CRC test vectors for CRC16-CCITT?
I do not have a CRC implementation I can trust and either need to test someone's implementation or my own. (For CRC32, I use the PNG code as the gold standard, as it's a reputable reference…

Jason S
- 184,598
- 164
- 608
- 970
5
votes
2 answers
CRC16 ISO 13239 Implementation
i'm trying to implement Crc16 in C#. I already tried many different implementations, but most of them gives me different values. Here are some of the codes that i already used.
private static int POLYNOMIAL = 0x8408;
private static int…

Fabio Reis
- 95
- 1
- 2
- 11
5
votes
1 answer
Eliminating sequences in a message
I have an odd communications channel, and I need to detect errors as well as eliminate certain sequences in the channel.
Each message is 12 bits long, split into 3 nibbles (of 4 bits each). I need to extract at least 450 different codes out of this,…

Adam Davis
- 91,931
- 60
- 264
- 330
5
votes
0 answers
different between CRC8 , CRC16 and CRC32?
I would like to know the difference and how to choose the polynomial generator for different crc ?
And in some C code they have look up table to compute crc and some of them do it by xor truth table. but in both the cases it is 1byte data array.…

Vino
- 91
- 2
- 7