File: blend.go

package info (click to toggle)
golang-github-segmentio-asm 1.2.0%2Bgit20231107.1cfacc8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 932 kB
  • sloc: asm: 6,093; makefile: 32
file content (16 lines) | stat: -rw-r--r-- 232 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package mem

func blendGeneric(dst, src []byte) int {
	switch {
	case len(dst) < len(src):
		src = src[:len(dst)]
	case len(dst) > len(src):
		dst = dst[:len(src)]
	}

	for i := range dst {
		dst[i] |= src[i]
	}

	return len(dst)
}