WriteUint32Slice writes []uint32 to buffer using ARRAY protocol
(buf *ByteBuffer, value []uint32)
| 955 | |
| 956 | // WriteUint32Slice writes []uint32 to buffer using ARRAY protocol |
| 957 | func WriteUint32Slice(buf *ByteBuffer, value []uint32) { |
| 958 | size := len(value) * 4 |
| 959 | buf.WriteLength(size) |
| 960 | if len(value) > 0 { |
| 961 | if isLittleEndian { |
| 962 | buf.WriteBinary(unsafe.Slice((*byte)(unsafe.Pointer(&value[0])), size)) |
| 963 | } else { |
| 964 | for i := 0; i < len(value); i++ { |
| 965 | buf.WriteInt32(int32(value[i])) |
| 966 | } |
| 967 | } |
| 968 | } |
| 969 | } |
| 970 | |
| 971 | // ReadUint32Slice reads []uint32 from buffer using ARRAY protocol |
| 972 | func ReadUint32Slice(buf *ByteBuffer, err *Error) []uint32 { |
no test coverage detected