botocore
botocore copied to clipboard
Add readinto to StreamingBody
This adds a readinto implementation to StreamingBody, following the contract outlined in the Python io package.
The primary motivation for this is that it allows consumers to wrap the StreamingBody in an io.BufferedReader. This provides a nice performance boost for parsing streaming binary data formats, where you want to be able to read small numbers of bytes in your parsing algorithm, but benefit from reading large chunks of data from upstream.