NuGet.Crc32.Calculate C# (CSharp) Méthode

Calculate() static private méthode

static private Calculate ( Stream stream ) : uint
stream System.IO.Stream
Résultat uint
        internal static uint Calculate(Stream stream)
        {
            // Copy the stream to a memory steam and get the CRC32 of the bytes
            using (var memoryStream = new MemoryStream())
            {
                stream.CopyTo(memoryStream);
                return Crc32.Calculate(memoryStream.ToArray());
            }
        }

Same methods

Crc32::Calculate ( byte buffer ) : uint
Crc32::Calculate ( byte buffer, int offset, int length ) : uint
Crc32::Calculate ( string content ) : uint
Crc32::Calculate ( string content, Encoding encoding ) : uint
Crc32::Calculate ( uint crc32, byte buffer, int offset, int length ) : uint

Usage Example

Exemple #1
0
 internal static uint Calculate(Stream stream)
 {
     // Copy the stream to a memory steam and get get the CRC32 of the bytes
     using (var memoryStream = new MemoryStream()) {
         stream.CopyTo(memoryStream);
         return(Crc32.Calculate(memoryStream.ToArray()));
     }
 }
All Usage Examples Of NuGet.Crc32::Calculate