
Additional notes:

  The segments used/declared in the PKWARE Data Compression
  Library are:

    DGROUP GROUP _DATA
    ASSUME DS: DGROUP
    _DATA SEGMENT use16 WORD PUBLIC 'DATA'

    PK_TEXT SEGMENT use16 DWORD 'CODE'
    ASSUME CS: PK_TEXT
  
  When used under Windows or OS/2, the _DATA segment used by the
  library should be declared 'non shareable' and 'non moveable'
  in the .DEF file.  When used with a 32-bit application using
  a DOS extender, these segments must be declared to be 16-bit
  segments.



CRC-32 routine:

  This routine calculates a running CRC-32 value on the buffer
  passed to it.  You should use proper CRC pre and post-conditioning,
  meaning an initial start value of ~0 (all ones) and the final
  value be one's complemented.  Below is an example pseudo-code
  code using the CRC 32 routine:
  
  unsigned long far pascal crc32(
  unsigned char far *buffer,
  unsigned short int far *size,
  unsigned long far *old_crc);

  unsigned long crc_cal = ~0;
  unsigned short int size;
  extern char far buffer[];	/* some buffer containing data */
  				/* data to be CRC'd */
  

  while (data is being put in buffer)
    { size = amount of data in buffer;
      crc_val=crc32(buffer,&size,&crc_val);
    }
    
  crc_val=~crc_val;

  printf("Final CRC residual value is: %lu\n",crc_val);



  Turbo Pascal has a specific CRC object module, which is in the PASCAL
  subdirectory.  The object module name is CRC32TP.OBJ.

  var
    Source_crc:	LongInt;
    Size:	Word;

  function crc32(var Buf:bufftype;
		 var Buffersize : Word;
		 var crc: LongInt): LongInt; far; External;

  Source_crc := -1;                       { Initialize the CRC }

  While data_is_being_put_in_buffer do
    begin
      size = amount of data in buffer;
      Source_crc := crc32(Buffer, BytesRead, Source_crc)
    end;

  Source_crc := (-Source_crc) - 1;        { Ones's complement  }

