NCBI C++ ToolKit
Macros | Functions
crc32.c File Reference
#include "zutil_cf.h"
#include "crc32.h"
+ Include dependency graph for crc32.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define local   static
 
#define TBLS   1
 
#define DO1   crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
 
#define DO8   DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
 
#define GF2_DIM   32 /* dimension of GF(2) vectors (length of CRC) */
 

Functions

static unsigned long gf2_matrix_times (unsigned long *mat, unsigned long vec)
 
static void gf2_matrix_square (unsigned long *square, unsigned long *mat)
 
static uLong crc32_combine_ (uLong crc1, uLong crc2, z_off64_t len2)
 
const z_crc_t FAR *ZEXPORT get_crc_table ()
 
static unsigned long crc32_generic (unsigned long crc, const unsigned char FAR *buf, uInt len)
 
uLong crc32 (uLong crc, const Bytef *buf, uInt len)
 
uLong ZEXPORT crc32_combine (uLong crc1, uLong crc2, z_off_t len2)
 
uLong ZEXPORT crc32_combine64 (uLong crc1, uLong crc2, z_off64_t len2)
 

Macro Definition Documentation

◆ DO1

#define DO1   crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)

Definition at line 242 of file crc32.c.

◆ DO8

#define DO8   DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1

Definition at line 243 of file crc32.c.

◆ GF2_DIM

#define GF2_DIM   32 /* dimension of GF(2) vectors (length of CRC) */

Definition at line 450 of file crc32.c.

◆ local

#define local   static

Definition at line 77 of file crc32.c.

◆ TBLS

#define TBLS   1

Definition at line 90 of file crc32.c.

Function Documentation

◆ crc32()

uLong crc32 ( uLong  crc,
const Bytef buf,
uInt  len 
)

Definition at line 354 of file crc32.c.

References buf, crc32_generic(), and len.

◆ crc32_combine()

uLong ZEXPORT crc32_combine ( uLong  crc1,
uLong  crc2,
z_off_t  len2 
)

Definition at line 530 of file crc32.c.

References crc32_combine_().

◆ crc32_combine64()

uLong ZEXPORT crc32_combine64 ( uLong  crc1,
uLong  crc2,
z_off64_t  len2 
)

Definition at line 535 of file crc32.c.

References crc32_combine_().

◆ crc32_combine_()

static uLong crc32_combine_ ( uLong  crc1,
uLong  crc2,
z_off64_t  len2 
)
static

Definition at line 477 of file crc32.c.

References GF2_DIM, gf2_matrix_square(), gf2_matrix_times(), n, and row.

Referenced by crc32_combine(), and crc32_combine64().

◆ crc32_generic()

static unsigned long crc32_generic ( unsigned long  crc,
const unsigned char FAR buf,
uInt  len 
)
static

Definition at line 246 of file crc32.c.

References buf, DO1, DO8, len, and Z_NULL.

Referenced by crc32().

◆ get_crc_table()

const z_crc_t FAR* ZEXPORT get_crc_table ( )

Definition at line 232 of file crc32.c.

References crc_table, and FAR.

◆ gf2_matrix_square()

static void gf2_matrix_square ( unsigned long *  square,
unsigned long *  mat 
)
static

Definition at line 468 of file crc32.c.

References GF2_DIM, gf2_matrix_times(), n, and square().

Referenced by crc32_combine_().

◆ gf2_matrix_times()

static unsigned long gf2_matrix_times ( unsigned long *  mat,
unsigned long  vec 
)
static

Definition at line 453 of file crc32.c.

Referenced by crc32_combine_(), and gf2_matrix_square().

Modified on Mon Jul 15 05:32:01 2024 by modify_doxy.py rev. 669887