func (b *fixedBuffer) Read(p []byte) (n int, err error) {
	if b.r == b.w {
		return 0, errReadEmpty
	}
	n = copy(p, b.buf[b.r:b.w])
	b.r += n
	if b.r == b.w {
		b.r = 0
		b.w = 0
	}
	return n, nil
}
Read copies bytes from the buffer into p.
It is an error to read when no data is available.
package http2
import (
	"errors"
)
type fixedBuffer struct {
	buf  []byte
	r, w int
}
var (
	errReadEmpty = errors.New("read from empty fixedBuffer")
	errWriteFull = errors.New("write on full fixedBuffer")
)