bufio.go 329 B

12345678910111213141516171819202122
  1. package bufio
  2. import (
  3. "io"
  4. )
  5. type Reader struct {
  6. buf [][]byte
  7. R io.ReadSeeker
  8. }
  9. func NewReaderSize(r io.ReadSeeker, size int) *Reader {
  10. buf := make([]byte, size*2)
  11. return &Reader{
  12. R: r,
  13. buf: [][]byte{buf[0:size], buf[size:]},
  14. }
  15. }
  16. func (self *Reader) ReadAt(b []byte, off int64) (n int, err error) {
  17. return
  18. }