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

Function writeFloat64ListValues

go/fory/slice_primitive_list.go:909–920  ·  view source on GitHub ↗
(buf *ByteBuffer, value []float64)

Source from the content-addressed store, hash-verified

907}
908
909func writeFloat64ListValues(buf *ByteBuffer, value []float64) {
910 size := len(value) * 8
911 if len(value) > 0 {
912 if isLittleEndian {
913 buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size))
914 } else {
915 for _, v := range value {
916 buf.WriteFloat64(v)
917 }
918 }
919 }
920}
921
922func readFloat64ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool) []float64 {
923 result := make([]float64, length)

Callers 1

writeValuesMethod · 0.85

Calls 3

SliceMethod · 0.80
WriteBinaryMethod · 0.45
WriteFloat64Method · 0.45

Tested by

no test coverage detected