package mem

import "github.com/segmentio/asm/mem"

Index

Functions

func Blend

func Blend(dst []byte, src []byte) int

Blend copies the one-bits of src to dst, returning the number of bytes written.

func ContainsByte

func ContainsByte(haystack []byte, needle byte) bool

func Copy

func Copy(dst []byte, src []byte) int

Copy copies src to dst, returning the number of bytes written.

func CountPair

func CountPair(b []byte, n int) int

CountPair returns the byte index of the first pair of two equal elements of size n.

If no pairs of equal elements were found, len(b) is returned.

func IndexPair

func IndexPair(b []byte, n int) int

IndexPair returns the byte index of the first pair of two equal elements of size n.

If no pairs of equal elements were found, -1 is returned.

func Mask

func Mask(dst []byte, src []byte) int

Mask set bits of dst to zero and copies the one-bits of src to dst, returning the number of bytes written.

Source Files

blend.go blend_amd64.go contains.go contains_amd64.go copy.go copy_amd64.go count_pair.go count_pair_amd64.go index_pair.go index_pair_amd64.go mask.go mask_amd64.go mem.go

Version
v1.1.0
Published
Oct 15, 2021
Platform
darwin/amd64
Imports
2 packages
Last checked
1 hour ago

Tools for package owners.