MCPcopy Create free account
hub / github.com/apache/fory / writeInt16ListValues

Function writeInt16ListValues

go/fory/slice_primitive_list.go:525–536  ·  view source on GitHub ↗
(buf *ByteBuffer, value []int16)

Source from the content-addressed store, hash-verified

523}
524
525func writeInt16ListValues(buf *ByteBuffer, value []int16) {
526 size := len(value) * 2
527 if len(value) > 0 {
528 if isLittleEndian {
529 buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size))
530 } else {
531 for _, v := range value {
532 buf.WriteInt16(v)
533 }
534 }
535 }
536}
537
538func readInt16ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool) []int16 {
539 result := make([]int16, length)

Callers 1

writeValuesMethod · 0.85

Calls 3

SliceMethod · 0.80
WriteBinaryMethod · 0.45
WriteInt16Method · 0.45

Tested by

no test coverage detected