Sha256: a5be111d7746b7fbeb5f72b533f5da8ba31a70ad7edeceff3af19b002246331b

Contents?: true

Size: 370 Bytes

Versions: 8

Compression:

Stored size: 370 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

8 entries across 8 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/mspack/crc32.h
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/mspack/crc32.h
libmspack-0.1.0 ext/libmspack/mspack/crc32.h
libmspack-0.0.5 ext/libmspack/mspack/crc32.h
libmspack-0.0.4 ext/libmspack/mspack/crc32.h
libmspack-0.0.3 ext/libmspack/mspack/crc32.h
libmspack-0.0.2 ext/libmspack/mspack/crc32.h
libmspack-0.0.1 ext/libmspack/mspack/crc32.h