bytesutil

package
v0.0.0-...-341aec2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SHA256Hex

func SHA256Hex(b []byte) string

SHA256Hex computes SHA-256 and returns lowercase hex string.

Types

type RawDiffSpan

type RawDiffSpan struct {
	Off    int64 `json:"off"`
	Len    int64 `json:"len"`
	Afirst byte  `json:"a_first"`
	Bfirst byte  `json:"b_first"`
}

RawDiffSpan describes a differing span between two byte slices. If Len < 0, it indicates a tail size delta (a.Size - b.Size) at Off.

func DiffRaw

func DiffRaw(a, b []byte, maxSpans int) []RawDiffSpan

DiffRaw returns up to maxSpans differing spans between a and b.

Jump to

Keyboard shortcuts

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