You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
joy4/utils/bits/bufio/bufio.go

24 lines
326 B
Go

4 years ago
package bufio
import (
"io"
)
type Reader struct {
buf [][]byte
R io.ReadSeeker
}
func NewReaderSize(r io.ReadSeeker, size int) *Reader {
buf := make([]byte, size*2)
return &Reader{
R: r,
buf: [][]byte{buf[0:size], buf[size:]},
}
}
func (self *Reader) ReadAt(b []byte, off int64) (n int, err error) {
return
}