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

Function readUint64ListValues

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

Source from the content-addressed store, hash-verified

774}
775
776func readUint64ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []uint64 {
777 result := make([]uint64, length)
778 if !hasNull && typeID == UINT64 {
779 size := length * 8
780 if isLittleEndian {
781 buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size))
782 } else {
783 for i := 0; i < length; i++ {
784 result[i] = uint64(buf.ReadInt64(err))
785 }
786 }
787 return result
788 }
789 for i := 0; i < length; i++ {
790 if hasNull && buf.ReadInt8(err) == NullFlag {
791 continue
792 }
793 switch typeID {
794 case UINT64:
795 result[i] = uint64(buf.ReadInt64(err))
796 case TAGGED_UINT64:
797 result[i] = buf.ReadTaggedUint64(err)
798 default:
799 result[i] = buf.ReadVarUint64(err)
800 }
801 }
802 return result
803}
804
805func writeIntListValues(buf *ByteBuffer, value []int, typeID TypeId) {
806 if reflect.TypeOf(int(0)).Size() == 8 {

Callers 2

readValuesMethod · 0.85
readUintListValuesFunction · 0.85

Calls 7

SliceMethod · 0.80
ReadTaggedUint64Method · 0.80
ReadVarUint64Method · 0.80
ReadMethod · 0.65
uint64Function · 0.50
ReadInt64Method · 0.45
ReadInt8Method · 0.45

Tested by

no test coverage detected