func (b *Buffer) Datas() []byte {
	return b.buf[:b.pos]
}
Datas returns the datas of the buffer.
package common
import (
	"bytes"
	"io"
)
var (
	ErrIOEOF = io.EOF
)
type Buffer struct {
	pos  int
	seek int
	cap  int
	buf  []byte
}
func NewBuffer(cap int) *Buffer {
	return &Buffer{pos: 0,
		cap: cap,
		buf: make([]byte, cap),
	}
}
func ReadBuffer(b []byte) *Buffer {
	return &Buffer{
		buf: b,
		pos: len(b),
	}
}
func (b *Buffer) Reset(data []byte) {
	b.buf = data
	b.pos = len(data)
	b.seek = 0
}