func (r *reader) Slice(n int) ([]byte, error) {
	if r.i+int64(n) > int64(len(r.s)) {
		return nil, io.EOF
	}
	cur := r.i
	r.i += int64(n)
	return r.s[cur:r.i], nil
}
Slice selects a sub-slice of next bytes. This is similar to Read() but does not
actually perform a copy, but simply uses the underlying slice (if available) and
returns a sub-slice pointing to the same array. Since this requires access
to the underlying data, this is only available for our default reader.
package binary
import (
	"io"
)
type reader struct {
	s []byte
	i int64  
}
func (r *reader) Len() int {
	if r.i >= int64(len(r.s)) {
		return 0
	}
	return int(int64(len(r.s)) - r.i)
}
func (r *reader) Size() int64 { return int64(len(r.s)) }
func (r *reader) Read(b []byte) (n int, err error) {
	if r.i >= int64(len(r.s)) {
		return 0, io.EOF
	}
	n = copy(b, r.s[r.i:])
	r.i += int64(n)
	return
}
func (r *reader) ReadByte() (byte, error) {
	if r.i >= int64(len(r.s)) {
		return 0, io.EOF
	}
	b := r.s[r.i]
	r.i++
	return b, nil
}