ReadByteSlice reads []byte from buffer using ARRAY protocol
(buf *ByteBuffer, err *Error)
| 715 | |
| 716 | // ReadByteSlice reads []byte from buffer using ARRAY protocol |
| 717 | func ReadByteSlice(buf *ByteBuffer, err *Error) []byte { |
| 718 | size := buf.ReadLength(err) |
| 719 | if size == 0 { |
| 720 | return make([]byte, 0) |
| 721 | } |
| 722 | if !buf.CheckReadable(size, err) { |
| 723 | return nil |
| 724 | } |
| 725 | result := make([]byte, size) |
| 726 | buf.Read(result) |
| 727 | return result |
| 728 | } |
| 729 | |
| 730 | // WriteBoolSlice writes []bool to buffer using ARRAY protocol |
| 731 | func WriteBoolSlice(buf *ByteBuffer, value []bool) { |
nothing calls this directly
no test coverage detected