home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / CRC32.pod < prev    next >
Encoding:
Text File  |  1999-11-30  |  1.5 KB  |  61 lines

  1. =head1 NAME
  2.  
  3. CRC32 - Perl interface for cyclic redundency check generation
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.     use String::CRC32;
  8.     
  9.     $crc = crc32("some string");
  10.     $crc = crc32("some string", initvalue);
  11.  
  12.     $somestring = "some string";
  13.     $crc = crc32($somestring);
  14.  
  15.     open(SOMEFILE, "location/of/some.file");
  16.     $crc = crc32(*SOMEFILE);
  17.     close(SOMEFILE);
  18.  
  19. =head1 DESCRIPTION
  20.  
  21. The B<CRC32> module calculates CRC sums of 32 bit lenghts.
  22. It generates the same CRC values as ZMODEM, PKZIP, PICCHECK and
  23. many others.
  24.  
  25. Despite its name, this module is able to compute the checksum of strings as
  26. well as of files.
  27.  
  28. =head1 EXAMPLES
  29.  
  30.     $crc = crc32("some string");
  31.  
  32.   results in the same as
  33.  
  34.     $crc = crc32(" string", crc32("some"));
  35.  
  36. This is useful for subsequent CRC checking of substrings.
  37.  
  38. You may even check files:
  39.  
  40.     open(SOMEFILE, "location/of/some.file");
  41.     $crc = crc32(*SOMEFILE);
  42.     close(SOMEFILE);
  43.  
  44. A init value may also been supplied in the above example.
  45.  
  46. =head1 AUTHOR
  47.  
  48. Soenke J. Peters <peters@simprovement.com>
  49.  
  50. Please be so kind as to report any bugs/suggestions to the above address.
  51.  
  52. =head1 COPYRIGHT
  53.  
  54. CRC algorithm code taken from CRC-32 by Craig Bruce. 
  55. The module stuff is inspired by a similar perl module called 
  56. String::CRC by David Sharnoff & Matthew Dillon.
  57. Horst Fickenscher told me that it could be useful to supply an init
  58. value to the crc checking function and so I included this possibility.
  59.  
  60. The author of this package disclaims all copyrights and 
  61. releases it into the public domain.