MCPcopy
hub / github.com/RoaringBitmap/roaring / uint16SliceAsByteSlice

Function uint16SliceAsByteSlice

serialization_generic.go:78–86  ·  view source on GitHub ↗
(slice []uint16)

Source from the content-addressed store, hash-verified

76}
77
78func uint16SliceAsByteSlice(slice []uint16) []byte {
79 by := make([]byte, len(slice)*2)
80
81 for i, v := range slice {
82 binary.LittleEndian.PutUint16(by[i*2:], v)
83 }
84
85 return by
86}
87
88func interval16SliceAsByteSlice(slice []interval16) []byte {
89 by := make([]byte, len(slice)*4)

Callers 1

TestByteInputFlowFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestByteInputFlowFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…