src/crc32.c File Reference

Source - Crc32 checksum. More...

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "crc32.h"

Go to the source code of this file.

Defines

#define CRC_BUFFER_SIZE   10240
 Size of buffer used to compute crc of files.

Functions

void crc32_init_seed (const uint32_t polynominal)
 initialize crc32 compute table
uint32_t crc32 (const char *data, const size_t size)
 compute an array crc32 checksum
uint32_t strcrc32 (const char *data)
 compute a string crc32 checksum
uint32_t crc32_file (const char *path)
 compute a file crc32 checksum

Detailed Description

Source - Crc32 checksum.

Author:
Julien Blitte
Version:
0.1

Definition in file crc32.c.


Function Documentation

uint32_t crc32 ( const char *  data,
const size_t  size 
) [inline]

compute an array crc32 checksum

Parameters:
data data source
size size of source
Returns:
data checksum

Definition at line 79 of file crc32.c.

Referenced by db5_index_index_column().

uint32_t crc32_file ( const char *  path  ) 

compute a file crc32 checksum

Parameters:
path file source - utf8
Returns:
file checksum

Definition at line 100 of file crc32.c.

References CRC_BUFFER_SIZE.

void crc32_init_seed ( const uint32_t  polynominal  ) 

initialize crc32 compute table

Parameters:
polynominal seed

Definition at line 60 of file crc32.c.

uint32_t strcrc32 ( const char *  data  ) 

compute a string crc32 checksum

Parameters:
data string source
Returns:
string checksum

Definition at line 84 of file crc32.c.

Referenced by names_generate_shortname(), and names_insert().

 All Classes Files Functions Variables Typedefs Defines

Generated on Mon Jan 11 00:15:07 2010 for db5fuse by  doxygen 1.6.1