(value bool)
| 182 | } |
| 183 | |
| 184 | func (b *ByteBuffer) WriteBool(value bool) { |
| 185 | b.grow(1) |
| 186 | // Branchless: directly convert bool to byte via unsafe |
| 187 | b.data[b.writerIndex] = *(*byte)(unsafe.Pointer(&value)) |
| 188 | b.writerIndex++ |
| 189 | } |
| 190 | |
| 191 | func (b *ByteBuffer) WriteByte(value byte) error { |
| 192 | b.grow(1) |