erlang and crc32

Max Lapshin max.lapshin@REDACTED
Tue Feb 9 10:27:42 CET 2010


Hi, while working with MPEG TS, I've encountered problems with crc32.
Here is a part of PAT header:

PAT = <<00,00,16#b0,16#0d,16#1c,16#18,16#d1,00,00,00,16#01,16#e0,16#42>>.

VLC generates such CRC32:

<<16#90,16#25,16#12,16#e2>> = <<2418348770:32>>.

But erlang:crc32(PAT) = 2322700764

In this article author solves the same problem:
http://easyerl.blogspot.com/2007/11/nagios-beurk-nrpe-support-for-erlang.html

He implements the same algorithm, as VLC does. More discussion:
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg22401.html
There is told, that algorithm requires changes.

Questions are:
1) are there really different flavours of crc32?
2) can I rearrange my data so, that erlang:crc32 or any other default
function will work?


More information about the erlang-questions mailing list