openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
crc32.h
Go to the documentation of this file.
1
#ifndef CRC32_H
2
#define CRC32_H
3
4
/* $Id: crc32.h,v 1.1 2003-10-17 15:35:49 tmbinc Exp $ */
5
6
#include <stdint.h>
7
8
extern
const
uint32_t
crc32_table
[256];
9
10
/* Return a 32-bit CRC of the contents of the buffer. */
11
12
static
inline
uint32_t
13
crc32
(uint32_t
val
,
const
void
*ss,
int
len)
14
{
15
const
unsigned
char
*s =(
const
unsigned
char
*) ss;
16
while
(--len >= 0)
17
// val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8);
18
val
= (
val
<< 8) ^
crc32_table
[(
val
>> 24) ^ *s++];
19
return
val
;
20
}
21
22
#endif
crc32
static uint32_t crc32(uint32_t val, const void *ss, int len)
Definition:
crc32.h:13
crc32_table
const uint32_t crc32_table[256]
Definition:
crc32.cpp:99
Tools.UnitConversions.val
val
Definition:
UnitConversions.py:88
lib
dvb
crc32.h
Generated by
1.9.1