-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Labels
enhancementNew feature or requestNew feature or requestmajorMajor changes requiring major version upgradesMajor changes requiring major version upgradesperformance
Description
Based on discussion in #441. The proposal is to create a buffered reader type which encapsulates a ReadSeeker and a buffered Reder (bufio.Reader). Rather than accessing and working with both separately.
The suggested type is something as follows:
// bufferedReadSeeker offers buffered read access to a seekable source (such as a file) with seek capabilities.
type bufferedReadSeeker struct {
rs io.ReadSeeker
reader *bufio.Reader
}
// Implement the Read and Seek methods.The reason for using the bufio.Reader is purely based on performance during parsing as it has a buffer. Any time we change the offset position of rs a new reader must be constructed with a new buffer (and use the buffered information to correct for offsets as done in parser.GetPosition).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmajorMajor changes requiring major version upgradesMajor changes requiring major version upgradesperformance