hashmerge

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2021 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package hashmerge provides functionality for merging hashes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineAdler32

func CombineAdler32(adler1, adler2 uint32, len2 int64) uint32

CombineAdler32 combines two Adler-32 checksums together. Let AB be the string concatenation of two strings A and B. Then Combine computes the checksum of AB given only the checksum of A, the checksum of B, and the length of B:

adler32.Checksum(AB) == CombineAdler32(adler32.Checksum(A), adler32.Checksum(B), len(B))

func CombineCRC32

func CombineCRC32(poly, crc1, crc2 uint32, len2 int64) uint32

CombineCRC32 combines two CRC-32 checksums together. Let AB be the string concatenation of two strings A and B. Then Combine computes the checksum of AB given only the checksum of A, the checksum of B, and the length of B:

tab := crc32.MakeTable(poly)
crc32.Checksum(AB, tab) == CombineCRC32(poly, crc32.Checksum(A, tab), crc32.Checksum(B, tab), len(B))

func CombineCRC64

func CombineCRC64(poly, crc1, crc2 uint64, len2 int64) uint64

CombineCRC64 combines two CRC-64 checksums together. Let AB be the string concatenation of two strings A and B. Then Combine computes the checksum of AB given only the checksum of A, the checksum of B, and the length of B:

tab := crc64.MakeTable(poly)
crc64.Checksum(AB, tab) == CombineCRC64(poly, crc64.Checksum(A, tab), crc64.Checksum(B, tab), len(B))

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL