crc man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

CRC(2)									CRC(2)

NAME
       crc - Crc module

SYNOPSIS
       include "crc.m";
       crc := load Crc Crc->PATH;

       CRCstate: adt {
	    crc: int;
	    crctab: array of int;
	    reg: int;
       };

       init: fn(poly: int, reg: int): ref CRCstate;
       crc: fn(state: ref CRCstate, buf: array of byte, nb: int): int;
       reset: fn(state: ref CRCstate);

DESCRIPTION
       Crc  provides  the  routines  to	 calculate  the CRC (cyclic redundancy
       check) over blocks of data.

       Init initializes the module and must be	called	first.	The  parameter
       poly  is	 the  polynomial  to  use when calculating the CRC value. If a
       value   of   0	is   given,   the   default   polynomial   16redb88320
       (8r035556101440)	 is used. The polynomial has its implicit top bit set.
       The second parameter reg is the number with which to initialize the CRC
       register.  This	is  commonly 0 but, for example, is 16rffffffff in the
       CRC32 algorithm. The final CRC value is also XORed  with	 this  number.
       The  function  returns  a  pointer to an adt that holds the current CRC
       value, the auxiliary table the algorithm uses and the initial  register
       value. These fields should not be accessed directly - they are only for
       internal use.

       Crc calculates the CRC value of the first nb bytes  of  the  array  buf
       given  the CRC state state as returned by the init function. It returns
       the current CRC value. It may be called repeatedly to calculate the CRC
       of  a  series of arrays of bytes, for example, when calculating the CRC
       value for the bytes in a file.

       Reset sets the CRC state to its initial value in readiness  for	a  new
       CRC calculation. It avoids the need to call init again.

SOURCE
       /appl/lib/crc.b

SEE ALSO
       sum(1)

									CRC(2)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net