(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId)
| 853 | } |
| 854 | |
| 855 | func readUintListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []uint { |
| 856 | result := make([]uint, length) |
| 857 | if reflect.TypeOf(uint(0)).Size() == 8 { |
| 858 | values := readUint64ListValues(buf, err, length, hasNull, typeID) |
| 859 | copy(unsafe.Slice((*uint64)(unsafe.Pointer(&result[0])), length), values) |
| 860 | return result |
| 861 | } |
| 862 | for i := 0; i < length; i++ { |
| 863 | if hasNull && buf.ReadInt8(err) == NullFlag { |
| 864 | continue |
| 865 | } |
| 866 | if typeID == UINT32 { |
| 867 | result[i] = uint(buf.ReadInt32(err)) |
| 868 | } else { |
| 869 | result[i] = uint(buf.ReadVarUint32(err)) |
| 870 | } |
| 871 | } |
| 872 | return result |
| 873 | } |
| 874 | |
| 875 | func writeFloat32ListValues(buf *ByteBuffer, value []float32) { |
| 876 | size := len(value) * 4 |
no test coverage detected