Xceed Real-Time Zip for .NET Documentation
Xceed.Compression.Formats Assembly / Xceed.Compression.Formats Namespace / ChecksumStream Class / ChecksumStream Constructor / ChecksumStream Constructor(Stream,ChecksumType,Int32,Int32)
The stream whose checksum will be calculated.
A ChecksumType value indicating which type of checksum to calculate.
The checksum value that is expected after all the data has been read from the inner stream.
The initial checksum value to use.


In This Topic
    ChecksumStream Constructor(Stream,ChecksumType,Int32,Int32)
    In This Topic
    Initializes a new instance of the ChecksumStream class that will calculate the checksum for the specified stream.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal inner As Stream, _
       ByVal checksumType As ChecksumType, _
       ByVal expectedChecksum As Integer, _
       ByVal initialChecksum As Integer _
    )
    'Usage
     
    Dim inner As Stream
    Dim checksumType As ChecksumType
    Dim expectedChecksum As Integer
    Dim initialChecksum As Integer
     
    Dim instance As New ChecksumStream(inner, checksumType, expectedChecksum, initialChecksum)
    public ChecksumStream( 
       Stream inner,
       ChecksumType checksumType,
       int expectedChecksum,
       int initialChecksum
    )

    Parameters

    inner
    The stream whose checksum will be calculated.
    checksumType
    A ChecksumType value indicating which type of checksum to calculate.
    expectedChecksum
    The checksum value that is expected after all the data has been read from the inner stream.
    initialChecksum
    The initial checksum value to use.
    Remarks

    If an excepted checksum was passed at construction of the ChecksumStream, System.IO.Stream.Close will throw an System.IO.IOException if the checksums do not match.

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also