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

Function WriteInt64Slice

go/fory/slice_primitive.go:867–879  ·  view source on GitHub ↗

WriteInt64Slice writes []int64 to buffer using ARRAY protocol

(buf *ByteBuffer, value []int64)

Source from the content-addressed store, hash-verified

865
866// WriteInt64Slice writes []int64 to buffer using ARRAY protocol
867func WriteInt64Slice(buf *ByteBuffer, value []int64) {
868 size := len(value) * 8
869 buf.WriteLength(size)
870 if len(value) > 0 {
871 if isLittleEndian {
872 buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size))
873 } else {
874 for i := 0; i < len(value); i++ {
875 buf.WriteInt64(value[i])
876 }
877 }
878 }
879}
880
881// ReadInt64Slice reads []int64 from buffer using ARRAY protocol
882func ReadInt64Slice(buf *ByteBuffer, err *Error) []int64 {

Callers 3

WriteDataMethod · 0.85
SerializeFunction · 0.85
WriteInt64SliceMethod · 0.85

Calls 4

SliceMethod · 0.80
WriteLengthMethod · 0.45
WriteBinaryMethod · 0.45
WriteInt64Method · 0.45

Tested by

no test coverage detected