Documentation ¶
Overview ¶
Package xbufio provides addons to std package bufio.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
Reader is a bufio.Reader that also reports current logical position in input stream.
func (*Reader) InputOffset ¶
InputOffset returns current logical position in input stream.
type SeqReaderAt ¶
type SeqReaderAt struct {
// contains filtered or unexported fields
}
SeqReaderAt implements buffering for a io.ReaderAt optimized for sequential access.
Both forward, backward and interleaved forward/backward access patterns are supported
NOTE SeqReaderAt is not safe to use from multiple goroutines concurrently.
Strictly speaking this goes against io.ReaderAt interface but sequential workloads usually mean sequential processing. It would be a pity to add mutex for nothing.
func NewSeqReaderAt ¶
func NewSeqReaderAt(r io.ReaderAt) *SeqReaderAt
NewSeqReaderAt wraps r with SeqReaderAt with buffer of default size.
func NewSeqReaderAtSize ¶
func NewSeqReaderAtSize(r io.ReaderAt, size int) *SeqReaderAt
NewSeqReaderAtSize wraps r with SeqReaderAt with buffer of specified size.
Click to show internal directories.
Click to hide internal directories.