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

Function ReadBoolSlice

go/fory/slice_primitive.go:740–751  ·  view source on GitHub ↗

ReadBoolSlice reads []bool from buffer using ARRAY protocol

(buf *ByteBuffer, err *Error)

Source from the content-addressed store, hash-verified

738
739// ReadBoolSlice reads []bool from buffer using ARRAY protocol
740func ReadBoolSlice(buf *ByteBuffer, err *Error) []bool {
741 size := buf.ReadLength(err)
742 if size == 0 {
743 return make([]bool, 0)
744 }
745 if !buf.CheckReadable(size, err) {
746 return nil
747 }
748 result := make([]bool, size)
749 buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size))
750 return result
751}
752
753// WriteInt8Slice writes []int8 to buffer using ARRAY protocol
754func WriteInt8Slice(buf *ByteBuffer, value []int8) {

Callers 3

ReadDataMethod · 0.85
ReadBoolSliceMethod · 0.85

Calls 4

ReadLengthMethod · 0.80
CheckReadableMethod · 0.80
SliceMethod · 0.80
ReadMethod · 0.65

Tested by 1