Header And Logo

| The world's most advanced open source database.

Defines | Functions

crc32.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define crc32(buf)   crc32_sz((buf),strlen(buf))


unsigned int crc32_sz (char *buf, int size)

Define Documentation

#define crc32 (   buf  )     crc32_sz((buf),strlen(buf))

Definition at line 11 of file crc32.h.

Function Documentation

unsigned int crc32_sz ( char *  buf,
int  size 

Definition at line 94 of file crc32.c.

References _CRC32_.

Referenced by ghstore_compress(), and ghstore_consistent().

    unsigned int crc = ~((unsigned int) 0);
    char       *p;
    int         len,

    len = 0;
    nr = size;
    for (len += nr, p = buf; nr--; ++p)
        _CRC32_(crc, *p);
    return ~crc;