func (r *Reader) Next() ([]byte, error) {
	var err error
	size, err := binary.ReadUvarint(r.r.(io.ByteReader))
	if err != nil {
		return nil, err
	}
	if size > r.bufcap {
		r.buf = make([]byte, size)
		r.bufcap = size
	}
	_, err = io.ReadFull(r.r, r.buf[:size])
	if err != nil {
		return nil, err
	}
	return r.buf[:size], nil
}
Next returns the next data record. It returns io.EOF if there are
no more records.
package recordio
import (
	"bufio"
	"encoding/binary"
	"io"
)
type Reader struct {
	r      io.Reader  
	buf    []byte     
	bufcap uint64     
}
func NewReader(r io.Reader) *Reader {
	if _, ok := r.(io.ByteReader); !ok {
		r = bufio.NewReader(r)
	}
	return &Reader{r: r}
}