(value int)
| 238 | } |
| 239 | |
| 240 | func (b *ByteBuffer) WriteLength(value int) { |
| 241 | b.grow(4) |
| 242 | if value >= MaxInt32 { |
| 243 | panic(fmt.Errorf("too long: %d", value)) |
| 244 | } |
| 245 | b.WriteVarUint32(uint32(value)) |
| 246 | } |
| 247 | |
| 248 | func (b *ByteBuffer) ReadLength(err *Error) int { |
| 249 | length := b.ReadVarUint32(err) |