IdeaBlade DevForce 2010 Help Reference
CRC32 Constructor(Int32,Boolean)
See Also  Send Feedback
IdeaBlade.Core Assembly > Ionic.Crc Namespace > CRC32 Class > CRC32 Constructor : CRC32 Constructor(Int32,Boolean)



polynomial
The polynomial to use for the CRC, expressed in the reversed (LSB) format: the highest ordered bit in the polynomial value is the coefficient of the 0th power; the second-highest order bit is the coefficient of the 1 power, and so on. Expressed this way, the polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320.
reverseBits
specify true if the instance should reverse data bits.
Create an instance of the CRC32 class, specifying the polynomial and whether to reverse data bits or not.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal polynomial As Integer, _
   ByVal reverseBits As Boolean _
)
Visual Basic (Usage)Copy Code
Dim polynomial As Integer
Dim reverseBits As Boolean
 
Dim instance As New CRC32(polynomial, reverseBits)
C# 
public CRC32( 
   int polynomial,
   bool reverseBits
)
C++/CLI 
public:
CRC32( 
   int polynomial,
   bool reverseBits
)

Parameters

polynomial
The polynomial to use for the CRC, expressed in the reversed (LSB) format: the highest ordered bit in the polynomial value is the coefficient of the 0th power; the second-highest order bit is the coefficient of the 1 power, and so on. Expressed this way, the polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320.
reverseBits
specify true if the instance should reverse data bits.

Remarks

In the CRC-32 used by BZip2, the bits are reversed. Therefore if you want a CRC32 with compatibility with BZip2, you should pass true here for the reverseBits parameter. In the CRC-32 used by GZIP and PKZIP, the bits are not reversed; Therefore if you want a CRC32 with compatibility with those, you should pass false for the reverseBits parameter.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.