func (b *Buffer) ReadU8() (uint8, error) {
	if err := b.check(1); err != nil {
		return 0, err
	}
	v := b.data[b.seek]
	b.seek++
	return v, nil
}
ReadU8 -- read a byte from the buffer.
package xbase
import (
	"fmt"
)
type Buffer struct {
	seek   int
	length int
	data   []byte
}
func NewBuffer() *Buffer {
	return &Buffer{}
}
func NewBufferReader(data []byte) *Buffer {
	return &Buffer{
		data:   data,
		length: len(data),
	}
}
func (b *Buffer) check(l int) error {
	if (b.seek + l) > b.length {
		return fmt.Errorf("error.seek[%v].required[%v].length[%v]", b.seek, l, b.length)
	}
	return nil
}
func (b *Buffer) WriteU8(v uint8) {
	b.data = append(b.data, v)
	b.length++
}