// CalculateChecksum calculates checksum for data using ct checksum type.
CalculateChecksum calculates checksum for data using ct checksum type.
// CalculateChecksum calculates checksum for data using ct checksum type .
func CalculateChecksum(data []byte, ct pb.Checksum_Algorithm) uint64 {
	switch ct {
	case pb.Checksum_CRC32C:
		return uint64(crc32.Checksum(data, CastagnoliCrcTable))
	case pb.Checksum_XXHash64:
		return xxhash.Sum64(data)
	default:
		panic("checksum type not supported")
	}
}
func CalculateChecksum ( data [ ] byte , ct pb . Checksum_Algorithm ) uint64 { switch ct { case pb . Checksum_CRC32C : return uint64 ( crc32 . Checksum ( data , CastagnoliCrcTable ) ) case pb . Checksum_XXHash64 : return xxhash . Sum64 ( data ) default : panic ( " " ) } }
CalculateChecksum calculates checksum for data using ct checksum type.
CalculateChecksum calculates checksum for data using ct checksum type .