get_crc_table

Name

get_crc_table -- generate a table for crc calculations

Synopsis

#include <zlib.h>

const uLongf * get_crc_table(void);

Description

Generate tables for a byte-wise 32-bit CRC calculation based on the polynomial: x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1

In a multi-threaded application, get_crc_table() should be called by one thread to initialize the tables before any other thread calls any libz function.

Return Value

The get_crc_table() function shall return a pointer to the first of a set of tables used internally to calculate CRC-32 values (see crc32()).

Errors

None defined.