Is there a useful io library for go

go’s io.Reader/Writer is very useful for stream data input/output
but golang Implement(bufio, strings.Reader,bytes.Reader, bytes.Buffer) was too simple
Are there any useful io libraries for third parties?
I want io lib that Implement Reader and Seeker method , and an multiple Reader
here is fake code

// ReadSeeker
NewReadSeeker(reader io.Reader) ReadSeeker{}
func (ReadSeeker) Read(b []byte) (int,error){}
func (ReadSeeker) Seek(offset int64, whence int) (int64, error){}

// MultiReader 
// It will cache reader with size ,and return num io.Reader for downstream user
NewMultiReader(reader io.Reader, size, num int) []io.Reader {}

I can’t tell what you’re trying to do. If you need an io.ReadSeeker, you can use an *os.File. Or do you want something in-memory? If so, why?

I also can’t tell what your example MultiReader function is supposed to do. Can you specify the problem you’re having?

I have wav process http server,that to analysis wav header ,and then repackage the wav header and data give downstream function,so I need like Seek function to reset the Reader

NewMultiReader is very useful ,just like Save the data while calculating the hash

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.