[Python-Dev] Re: [Distutils] Questions about distutils strategy

Guido van Rossum guido@CNRI.Reston.VA.US
Tue, 14 Dec 1999 09:53:04 -0500


> OK, a CRC-32 in binascii it is.  The CRC-32 I
> have comes with these comments which seem to indicate it is a
> more "official standard" CRC-32 than average:
> 
> # *  Crc - 32 BIT ANSI X3.66 CRC checksum files
> #*********************************************************************\
> #*                                                                    *|
> #* Demonstration program to compute the 32-bit CRC used as the frame  *|
> #* check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71     *|
> #* and FED-STD-1003, the U.S. versions of CCITT's X.25 link-level     *|
> #* protocol).  The 32-bit FCS was added via the Federal Register,     *|
> #* 1 June 1982, p.23798.  I presume but don't know for certain that   *|
> #* this polynomial is or will be included in CCITT V.41, which        *|
> #* defines the 16-bit CRC (often called CRC-CCITT) polynomial.  FIPS  *|
> #* PUB 78 says that the 32-bit FCS reduces otherwise undetected       *|
> #* errors by a factor of 10^-5 over 16-bit FCS.                       *|
> #*                                                                    *|
> #*********************************************************************
> #* Copyright (C) 1986 Gary S. Brown.  You may use this program, or
> #* code or tables extracted from it, as desired without restriction.
>  
> I can submit this as a patch to binascii, or if the Copyright bothers
> anyone, maybe it is better for Guido to use his CRC-32 from his ZIP
> code.  Preference?

I looked, but "my" crc32 in the zlib module (which was actually
contributed by Andrew Kuchling) is just a wrapper around the crc32
function in zlib, which is copyrighted by Mark Adler and follows the
zlib rules.

I propose to use Gary Brown's code.  I'll defend this to CNRI's
lawyers if need be.

Jim, have you checked that this is the right CRC to use for zip's CRC?
(This in the light of Tim's assertion that there are many CRCs around.)

--Guido van Rossum (home page: http://www.python.org/~guido/)