Sha256: ea76ff919f61ba5f240337744a01e39e0e976f315280c7301872fcfa6ff2e1d9

Contents?: true

Size: 377 Bytes

Versions: 3

Compression:

Stored size: 377 Bytes

Contents

#ifndef CRC32_H
#define CRC32_H

extern const unsigned int crc32_table[256];

/* Return a 32-bit CRC of the contents of the buffer. */

static inline unsigned int
crc32(unsigned int val, const void *ss, int len)
{
        const unsigned char *s = ss;
        while (--len >= 0)
                val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8);
        return val;
}

#endif

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libmspack-0.11.0 ext/libmspack/mspack/crc32.h
libmspack-0.10.1.2 ext/libmspack/mspack/crc32.h
libmspack-0.10.1 ext/libmspack/mspack/crc32.h