MCPcopy Create free account
hub / github.com/akalin/gopar / uint16LEToByteArray

Function uint16LEToByteArray

gf2p16/slice_test.go:20–26  ·  view source on GitHub ↗
(u16s []uint16)

Source from the content-addressed store, hash-verified

18}
19
20func uint16LEToByteArray(u16s []uint16) []byte {
21 bs := make([]byte, 2*len(u16s))
22 for i, x := range u16s {
23 binary.LittleEndian.PutUint16(bs[2*i:], x)
24 }
25 return bs
26}
27
28func tToUint16Array(ts []T) []uint16 {
29 u16s := make([]uint16, len(ts))

Callers 2

testMulByteSliceLEFunction · 0.70
testMulAndAddByteSliceLEFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected