func (sr *stringReader) readFrom(aa *mmap.File, offset, index int) int {
	return aa.ReadStringAt(&sr.sb, int64(offset))
}
readFrom reads data from arena starting at offset and stores it at provided index.
package bigqueue
import (
	"strings"
	"github.com/grandecola/mmap"
)
type reader interface {
	grow(n int)
	readFrom(aa *mmap.File, offset, index int) int
}
type bytesReader struct {
	b []byte
}
func (br *bytesReader) grow(n int) {
	if n < 0 {
		panic("bigqueue.reader.grow: negative count")
	}
	temp := make([]byte, n+len(br.b))
	if br.b != nil {
		_ = copy(temp, br.b)
	}
	br.b = temp
}
func (br *bytesReader) readFrom(aa *mmap.File, offset, index int) int {
	n, _ := aa.ReadAt(br.b[index:], int64(offset))
	return n
}
type stringReader struct {
	sb strings.Builder
}
func (sr *stringReader) grow(n int) {
	sr.sb.Grow(n)
}