Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
crc32.c File Reference
#include "zutil.h"
#include "crc32.h"

Go to the source code of 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

local unsigned long gf2_matrix_times OF ((unsigned long *mat, unsigned long vec))
 
local void gf2_matrix_square OF ((unsigned long *square, unsigned long *mat))
 
local uLong crc32_combine_ OF ((uLong crc1, uLong crc2, z_off64_t len2))
 
const z_crc_t FAR *ZEXPORT get_crc_table ()
 
unsigned long ZEXPORT crc32 (unsigned long crc, const unsigned char FAR *buf, uInt len)
 
local unsigned long gf2_matrix_times (unsigned long *mat, unsigned long vec)
 
local void gf2_matrix_square (unsigned long *square, unsigned long *mat)
 
local uLong crc32_combine_ (uLong crc1, uLong crc2, z_off64_t len2)
 
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 200 of file crc32.c.

Referenced by crc32().

◆ DO8

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

Definition at line 201 of file crc32.c.

Referenced by crc32().

◆ GF2_DIM

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

Definition at line 324 of file crc32.c.

Referenced by crc32_combine_(), and gf2_matrix_square().

◆ local

#define local   static

Definition at line 33 of file crc32.c.

Referenced by crc32().

◆ TBLS

#define TBLS   1

Definition at line 46 of file crc32.c.

Function Documentation

◆ crc32()

unsigned long ZEXPORT crc32 ( unsigned long  crc,
const unsigned char FAR buf,
uInt  len 
)

◆ crc32_combine()

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

Definition at line 411 of file crc32.c.

References crc32_combine_().

Referenced by gzcopy().

◆ crc32_combine64()

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

Definition at line 419 of file crc32.c.

References crc32_combine_().

◆ crc32_combine_()

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

Definition at line 355 of file crc32.c.

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

Referenced by crc32_combine(), and crc32_combine64().

◆ get_crc_table()

const z_crc_t FAR* ZEXPORT get_crc_table ( )

Definition at line 190 of file crc32.c.

References crc_table, and FAR.

Referenced by unzOpenCurrentFile3(), and zipOpenNewFileInZip4_64().

◆ gf2_matrix_square()

local void gf2_matrix_square ( unsigned long square,
unsigned long mat 
)

Definition at line 344 of file crc32.c.

References GF2_DIM, and gf2_matrix_times().

Referenced by crc32_combine_().

◆ gf2_matrix_times()

local unsigned long gf2_matrix_times ( unsigned long mat,
unsigned long  vec 
)

Definition at line 327 of file crc32.c.

Referenced by crc32_combine_(), and gf2_matrix_square().

◆ OF() [1/3]

local unsigned long gf2_matrix_times OF ( (unsigned long *mat, unsigned long vec )

◆ OF() [2/3]

local void gf2_matrix_square OF ( (unsigned long *square, unsigned long *mat)  )

◆ OF() [3/3]

local uLong crc32_combine_ OF ( (uLong crc1, uLong crc2, z_off64_t len2)  )