Documentation ¶
Overview ¶
Package streamio implements utilities for working with stream data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSeekOutOfRange indicates that a seek operation could not be fulfilled because the buffer was not big enough. ErrSeekOutOfRange = errors.New("out of range") )
Functions ¶
func CountBytes ¶
CountBytes returns an io.Reader that counts all bytes read and updates the counter appropriately. counter must not be nil.
func NewBufferedReadSeeker ¶
func NewBufferedReadSeeker(r io.Reader, size int) io.ReadSeeker
NewBufferedReadSeeker creates a new io.ReadSeeker that reads from r. Seek operations are implemented by buffering read operations from r. Seeking is only supported up to size bytes back. Advancing the reader will first return up to size bytes from the internal buffer before the next read operation is passed on to r.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.