Talk:CRC-32: Difference between revisions

From Rosetta Code
Content added Content deleted
m (moved Talk:CRC to Talk:CRC-32: More specific, should change task description too.)
(CRCs and tasks)
Line 3: Line 3:
: The questions that come to my mind...Which polynominal? Is this in pursuit of a particular protocol's check? (i.e. ethernet frame checksums, ZIP file stream checksums, etc). "CRC" isn't any more specific than, say, "draw a shape".--[[User:Short Circuit|Michael Mol]] 18:02, 29 November 2011 (UTC)
: The questions that come to my mind...Which polynominal? Is this in pursuit of a particular protocol's check? (i.e. ethernet frame checksums, ZIP file stream checksums, etc). "CRC" isn't any more specific than, say, "draw a shape".--[[User:Short Circuit|Michael Mol]] 18:02, 29 November 2011 (UTC)
:: I would like a task that calculates the ubiquitous CRC-32 as in RFC 1952 for GZIP. (The RFC contains an algorithm in C code, and refers to section 8.1.1.6.2 "32-bit frame check sequence" from [http://www.itu.int/rec/T-REC-V.42-200203-I/en ITU-T Rec. V.42].) However, I am not author of this draft task. --[[User:Kernigh|Kernigh]] 21:13, 29 November 2011 (UTC)
:: I would like a task that calculates the ubiquitous CRC-32 as in RFC 1952 for GZIP. (The RFC contains an algorithm in C code, and refers to section 8.1.1.6.2 "32-bit frame check sequence" from [http://www.itu.int/rec/T-REC-V.42-200203-I/en ITU-T Rec. V.42].) However, I am not author of this draft task. --[[User:Kernigh|Kernigh]] 21:13, 29 November 2011 (UTC)
::: Given that there are language (and even CPU) accelerators for different common cases of CRC32, I'd say go ahead and create a separate task for each form of interest. Probably use a naming scheme of "CRC32/$name", where $name would be the common name for the CRC32 variant. [[CRC32/CRC32c]], for example. I realize this would lead to a small explosion in tasks which would be mundane and uninteresting after the second or so variation, but that leaves low-hanging fruit for whoever comes along later. --[[User:Short Circuit|Michael Mol]] 15:27, 30 November 2011 (UTC)
::Isn't it possible to write a program that calculates an N-bit CRC of a string with polynomial P ? --[[User:Spekkio|Spekkio]] 21:14, 29 November 2011 (UTC)
::Isn't it possible to write a program that calculates an N-bit CRC of a string with polynomial P ? --[[User:Spekkio|Spekkio]] 21:14, 29 November 2011 (UTC)



Hmm, ok I see. There are many types of algoritms that can be called a CRC. I think the most common CRC algoritm would be the CRC-32 used by IEEE 802.3, also mentioned by [[User:Kernigh|Kernigh]]. But it would also be interesting to make CRC-8,CRC-16 etc... --[[User:Spekkio|Spekkio]] 07:47, 30 November 2011 (UTC)
Hmm, ok I see. There are many types of algoritms that can be called a CRC. I think the most common CRC algoritm would be the CRC-32 used by IEEE 802.3, also mentioned by [[User:Kernigh|Kernigh]]. But it would also be interesting to make CRC-8,CRC-16 etc... --[[User:Spekkio|Spekkio]] 07:47, 30 November 2011 (UTC)
: Maybe (I don't know), and perhaps its of theoretical interest, but who wants to use a generic algorithm? CRC is used specifically because it's a fast, low-cost way to generate a reasonable checksum. --[[User:Short Circuit|Michael Mol]] 15:27, 30 November 2011 (UTC)

Revision as of 15:27, 30 November 2011

Task goal

Hi, What do you want the task to be about? --Paddy3118 17:45, 29 November 2011 (UTC)

The questions that come to my mind...Which polynominal? Is this in pursuit of a particular protocol's check? (i.e. ethernet frame checksums, ZIP file stream checksums, etc). "CRC" isn't any more specific than, say, "draw a shape".--Michael Mol 18:02, 29 November 2011 (UTC)
I would like a task that calculates the ubiquitous CRC-32 as in RFC 1952 for GZIP. (The RFC contains an algorithm in C code, and refers to section 8.1.1.6.2 "32-bit frame check sequence" from ITU-T Rec. V.42.) However, I am not author of this draft task. --Kernigh 21:13, 29 November 2011 (UTC)
Given that there are language (and even CPU) accelerators for different common cases of CRC32, I'd say go ahead and create a separate task for each form of interest. Probably use a naming scheme of "CRC32/$name", where $name would be the common name for the CRC32 variant. CRC32/CRC32c, for example. I realize this would lead to a small explosion in tasks which would be mundane and uninteresting after the second or so variation, but that leaves low-hanging fruit for whoever comes along later. --Michael Mol 15:27, 30 November 2011 (UTC)
Isn't it possible to write a program that calculates an N-bit CRC of a string with polynomial P ? --Spekkio 21:14, 29 November 2011 (UTC)

Hmm, ok I see. There are many types of algoritms that can be called a CRC. I think the most common CRC algoritm would be the CRC-32 used by IEEE 802.3, also mentioned by Kernigh. But it would also be interesting to make CRC-8,CRC-16 etc... --Spekkio 07:47, 30 November 2011 (UTC)

Maybe (I don't know), and perhaps its of theoretical interest, but who wants to use a generic algorithm? CRC is used specifically because it's a fast, low-cost way to generate a reasonable checksum. --Michael Mol 15:27, 30 November 2011 (UTC)