ReadInt8Slice reads []int8 from buffer using ARRAY protocol
(buf *ByteBuffer, err *Error)
| 761 | |
| 762 | // ReadInt8Slice reads []int8 from buffer using ARRAY protocol |
| 763 | func ReadInt8Slice(buf *ByteBuffer, err *Error) []int8 { |
| 764 | size := buf.ReadLength(err) |
| 765 | if size == 0 { |
| 766 | return make([]int8, 0) |
| 767 | } |
| 768 | if !buf.CheckReadable(size, err) { |
| 769 | return nil |
| 770 | } |
| 771 | result := make([]int8, size) |
| 772 | buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size)) |
| 773 | return result |
| 774 | } |
| 775 | |
| 776 | // WriteInt16Slice writes []int16 to buffer using ARRAY protocol |
| 777 | func WriteInt16Slice(buf *ByteBuffer, value []int16) { |
no test coverage detected