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-05-07 UTC."],[[["The page provides documentation for the `UploadBufferSizeOption` in various versions, ranging from 2.11.0 to the latest release candidate 2.37.0-rc."],["`UploadBufferSizeOption` controls the size of the in-memory buffer used during formatted I/O operations before uploading a chunk to GCS."],["The buffer size for GCS chunks must be in multiples of 256KiB, so the option value is always rounded up to the next multiple."],["Formatted I/O `operator\u003c\u003c(std::istream&...)` is subject to this option, whereas `std::istream::write()` is not affected and is recommended for optimal performance."],["The underlying data type for the `UploadBufferSizeOption` is `std::size_t` which is what it is an alias of."]]],[]]