RetroArch
Macros | Functions | Variables
libz-crc32.c File Reference
#include <stdint.h>
Include dependency graph for libz-crc32.c:

Macros

#define _S_CRC32_H
 
#define DO1_CRC32(buf)   crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
 
#define DO2_CRC32(buf)   DO1_CRC32(buf); DO1_CRC32(buf);
 
#define DO4_CRC32(buf)   DO2_CRC32(buf); DO2_CRC32(buf);
 
#define DO8_CRC32(buf)   DO4_CRC32(buf); DO4_CRC32(buf);
 

Functions

unsigned long crc32 (unsigned long crc, const unsigned char *buf, unsigned int len)
 
const uint32_tget_crc_table (void)
 

Variables

static const unsigned long crc_table [256]
 

Macro Definition Documentation

◆ _S_CRC32_H

#define _S_CRC32_H

◆ DO1_CRC32

#define DO1_CRC32 (   buf)    crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);

◆ DO2_CRC32

#define DO2_CRC32 (   buf)    DO1_CRC32(buf); DO1_CRC32(buf);

◆ DO4_CRC32

#define DO4_CRC32 (   buf)    DO2_CRC32(buf); DO2_CRC32(buf);

◆ DO8_CRC32

#define DO8_CRC32 (   buf)    DO4_CRC32(buf); DO4_CRC32(buf);

Function Documentation

◆ crc32()

unsigned long crc32 ( unsigned long  crc,
const unsigned char *  buf,
unsigned int  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_crc_table()

const uint32_t* get_crc_table ( void  )

Variable Documentation

◆ crc_table

const unsigned long crc_table[256]
static