blazer icon indicating copy to clipboard operation
blazer copied to clipboard

make b2.Reader an io.WriterTo

Open kurin opened this issue 8 years ago • 3 comments

When downloading, the reader suffers from head-of-line blocking and has to buffer chunks that may have finished but which can't be flushed yet. If the b2.Reader satisfies io.WriterTo, then (for appropriate writers anyway) it will be able to flush that data as soon as it is available.

kurin avatar Sep 16 '17 07:09 kurin

make them WriterAts and ReaderAts while you're having fun in here

kurin avatar Sep 19 '17 23:09 kurin

WritersAt and ReadersAt

kurin avatar Sep 19 '17 23:09 kurin

w.WriterAt is never going to be feasible with b2's API. r.ReaderAt doesn't really make sense but might still be interesting.

kurin avatar Sep 20 '17 00:09 kurin