www.pudn.com > MPEG2systemsrc.rar > Poly.H


/* Copyright (C) 1995, Tektronix Inc. All Rights Reserved.
 *
 *   Usage Restrictions
 *
 * License is granted to copy, to use, and to make and to use derivative
 * works for research and evaluation purposes only.
 *
 *   Disclaimer of Warranty
 *
 * These software programs are available to the user without any license
 * fee or royalty on an "as is" basis.  Tektronix Inc. disclaims any and
 * all warranties, whether express, implied, or statuary, including any
 * implied warranties or merchantability or of fitness for a particular
 * purpose.  In no event shall the copyright-holder be liable for any 
 * incidental, punitive, or consequential damages of any kind whatsoever
 * arising from the use of these programs.
 *
 * This disclaimer of warranty extends to the user of these programs and
 * user's customers, employees, agents, transferees, successors, and
 * assigns.
 *
 * The Tektronix Inc. does not represent or warrant that the programs
 * furnished hereunder are free of infringement of any third-party
 * patents.
*/

/* Poly classes */
#ifndef poly_h
#define poly_h

typedef unsigned long CRC32;

class Poly
{
public:
  Poly ();
  void push_bit (char);
  int poly_cmp (char*);
  void print_bits ();
  unsigned char shift_reg[32];
private:
  CRC32	crc;
};

/*
 DOCUMENTATION

 Poly is used by InputPorts and OutputPorts for computing CRCs.  The
 32 bit polynomial specified in 13818-1 is "hardwired" into the code.
*/

#endif