rsyncchecksum

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Size = md4.Size

Variables

This section is empty.

Functions

func Checksum1

func Checksum1(buf []byte) uint32

func Checksum2

func Checksum2(seed int32, buf []byte) []byte

func FileChecksum added in v0.2.0

func FileChecksum(fn string) ([]byte, error)

func SignExtend

func SignExtend(b byte) uint32

SignExtend mirrors how C converts from (signed char) to uint32, i.e. using sign extension. get_checksum1 treats the buffer as (signed char*) instead of (unsigned char*), which likely was not a conscious choice, but here we are.

This function is exported for use in the rolling checksum in match.go.

func Tag

func Tag(sum uint32) uint16

func Tag2

func Tag2(s1, s2 uint16) uint16

Types

This section is empty.

Jump to

Keyboard shortcuts

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