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

Function readInt64ListValues

go/fory/slice_primitive_list.go:719–746  ·  view source on GitHub ↗
(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId)

Source from the content-addressed store, hash-verified

717}
718
719func readInt64ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []int64 {
720 result := make([]int64, length)
721 if !hasNull && typeID == INT64 {
722 size := length * 8
723 if isLittleEndian {
724 buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size))
725 } else {
726 for i := 0; i < length; i++ {
727 result[i] = buf.ReadInt64(err)
728 }
729 }
730 return result
731 }
732 for i := 0; i < length; i++ {
733 if hasNull && buf.ReadInt8(err) == NullFlag {
734 continue
735 }
736 switch typeID {
737 case INT64:
738 result[i] = buf.ReadInt64(err)
739 case TAGGED_INT64:
740 result[i] = buf.ReadTaggedInt64(err)
741 default:
742 result[i] = buf.ReadVarint64(err)
743 }
744 }
745 return result
746}
747
748func writeUint64ListValues(buf *ByteBuffer, value []uint64, typeID TypeId) {
749 switch typeID {

Callers 2

readValuesMethod · 0.85
readIntListValuesFunction · 0.85

Calls 6

SliceMethod · 0.80
ReadMethod · 0.65
ReadInt64Method · 0.45
ReadInt8Method · 0.45
ReadTaggedInt64Method · 0.45
ReadVarint64Method · 0.45

Tested by

no test coverage detected