Name

get_crc_table — Generates tables for a byte-wise 32-bit CRC calculation based on the polynomial.


Library

Libz.lib


Synopsis

#include <zlib.h>
const uLongf * get_crc_table(void);


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()).


Detailed 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.


Examples

To generate tables for a byte-wise 32-bit CRC calculation based on the polynomial:

#include <stdio.h>
#include <zlib.h>

void Get_crc_table( )

{
const unsigned long* pcrc_32_tab;
pcrc_32_tab = get_crc_table();
}

Errors

None defined.


Feedback

For additional information or queries on this page send feedback


© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.

Top