package bytesutil
import "github.com/influxdata/influxdb/pkg/bytesutil"
Index ¶
- func Clone(b []byte) []byte
- func CloneSlice(a [][]byte) [][]byte
- func Contains(a [][]byte, x []byte) bool
- func Intersect(a, b [][]byte) [][]byte
- func IsSorted(a [][]byte) bool
- func Pack(a []byte, width int, val byte) []byte
- func SearchBytes(a [][]byte, x []byte) int
- func SearchBytesFixed(a []byte, sz int, fn func(x []byte) bool) int
- func Sort(a [][]byte)
- func SortDedup(a [][]byte) [][]byte
- func Union(a, b [][]byte) [][]byte
Functions ¶
func Clone ¶
Clone returns a copy of b.
func CloneSlice ¶
CloneSlice returns a copy of a slice of byte slices.
func Contains ¶
Contains returns true if x is an element of the sorted slice a.
func Intersect ¶
Intersect returns the intersection of a & b in sorted order.
func IsSorted ¶
func Pack ¶
Pack converts a sparse array to a dense one. It removes sections of a containing runs of val of length width. The returned value is a subslice of a.
func SearchBytes ¶
SearchBytes performs a binary search for x in the sorted slice a.
func SearchBytesFixed ¶
SearchBytesFixed searches a for x using a binary search. The size of a must be a multiple of of x or else the function panics. There returned value is the index within a where x should exist. The caller should ensure that x does exist at this index.
func Sort ¶
func Sort(a [][]byte)
Sort sorts a slice of byte slices.
func SortDedup ¶
SortDedup sorts the byte slice a and removes duplicates. The ret
func Union ¶
Union returns the union of a & b in sorted order.
Source Files ¶
- Version
- v1.12.0 (latest)
- Published
- Apr 8, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 2 days ago –
Tools for package owners.