// WithBuffer - If the file is above a certain size it adds an Async reader
If the file is above a certain size it adds an Async reader
// WithBuffer - If the file is above a certain size it adds an Async reader
func (acc *Account) WithBuffer() *Account {
	acc.withBuf = true
	var buffers int
	if acc.size >= int64(fs.Config.BufferSize) || acc.size == -1 {
		buffers = int(int64(fs.Config.BufferSize) / asyncreader.BufferSize)
	} else {
		buffers = int(acc.size / asyncreader.BufferSize)
	}
	if buffers > 0 {
		rc, err := asyncreader.New(acc.origIn, buffers)
		if err != nil {
			fs.Errorf(acc.name, "Failed to make buffer: %v", err)
		} else {
			acc.in = rc
			acc.close = rc
		}
	}
	return acc
}
func ( acc * Account ) WithBuffer ( ) * Account { acc . withBuf = true var buffers int if acc . size >= int64 ( fs . Config . BufferSize ) || acc . size == - 1 { buffers = int ( int64 ( fs . Config . BufferSize ) / asyncreader . BufferSize ) } else { buffers = int ( acc . size / asyncreader . BufferSize ) } if buffers > 0 { rc , err := asyncreader . New ( acc . origIn , buffers ) if err != nil { fs . Errorf ( acc . name , " " , err ) } else { acc . in = rc acc . close = rc } } return acc }
If the file is above a certain size it adds an Async reader
If the file is above a certain size it adds an Async reader
// On big files add a buffer