Calculate() static private méthode

static private Calculate ( Stream stream ) : uint
stream System.IO.Stream
Résultat uint
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()));
     }
 }
Exemple #2
0
 public static bool ContentEquals(this Stream stream, Stream otherStream)
 {
     return(Crc32.Calculate(stream) == Crc32.Calculate(otherStream));
 }