Unit Crc

Classes

Functions

crc32 - crc32.
get_crc_table - Update a running crc with the bytes buf[0.

Types

Constants

Variables


Functions


function crc32(crc : uLong; buf : pBytef; len : uInt) : uLong;

crc32.c -- compute the CRC-32 of a data stream Copyright (C) 1995-1998 Mark Adler Pascal tranlastion Copyright (C) 1998 by Jacques Nomssi Nzali For conditions of distribution and use, see copyright notice in readme.txt

=========================================================================


function get_crc_table : puLong;

Update a running crc with the bytes buf[0..len-1] and return the updated crc. If buf is NULL, this function returns the required initial value for the crc. Pre- and post-conditioning (one's complement) is performed within this function so it shouldn't be done by the application. Usage example: var crc : uLong; begin crc := crc32(0, Z_NULL, 0); while (read_buffer(buffer, length) <> EOF) do crc := crc32(crc, buffer, length); if (crc <> original_crc) then error(); end;

========================================================================= This function can be used by asm versions of crc32()


Types


Constants


Variables