When using formatted I/O operations (typically operator<<(std::istream&...) this option controls the size of the in-memory buffer kept before a chunk is uploaded. Note that GCS only accepts chunks in multiples of 256KiB, so this option is always rounded up to the next such multiple.
Applications seeking optimal performance for downloads should avoid formatted I/O, and prefer using std::istream::write(). This option has no effect in that case.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["This webpage documents different versions of the `UploadBufferSizeOption` for Google Cloud Storage C++ client library."],["The latest release candidate version is 2.37.0-rc, and the current stable version shown is 2.27.0."],["The `UploadBufferSizeOption` controls the in-memory buffer size for formatted I/O upload operations, rounded up to the nearest multiple of 256KiB."],["Formatted I/O should be avoided in favor of `std::istream::write()` for optimal download performance, as this option is only utilized in formatted I/O."],["The `UploadBufferSizeOption` type is an alias of `std::size_t`, and can be used to control the size of the formatted I/O upload buffer."]]],[]]