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

Function writeInt32FixedListValues

go/fory/slice_primitive_list.go:603–614  ·  view source on GitHub ↗
(buf *ByteBuffer, value []int32)

Source from the content-addressed store, hash-verified

601}
602
603func writeInt32FixedListValues(buf *ByteBuffer, value []int32) {
604 size := len(value) * 4
605 if len(value) > 0 {
606 if isLittleEndian {
607 buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size))
608 } else {
609 for _, v := range value {
610 buf.WriteInt32(v)
611 }
612 }
613 }
614}
615
616func readInt32ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []int32 {
617 result := make([]int32, length)

Callers 1

writeInt32ListValuesFunction · 0.85

Calls 3

SliceMethod · 0.80
WriteBinaryMethod · 0.45
WriteInt32Method · 0.45

Tested by

no test coverage detected