I heard the word buffer after a long time today and wondering if somebody can give a good overview of buffer and some examples of how it matters in today's world.
相关问题
- Insert text into current buffer from function
- Webshot to Google Drive without storing intermedia
- Detecting file type from buffer in node js?
- Saving a 32 bit RGBA buffer into a .png file (
- C# Async TCP sockets: Handling buffer size and hug
相关文章
- How can I store an integer in a nodejs Buffer?
- C scanf in a loop with invalid input
- Understanding netty channel buffers and watermarks
- Inline <video> large file with buffer
- Protocol message tag had invalid wire type
- Mac application window stops updating
- GNU Screen: Environment variables
- How does Android apply alpha channel when using co
A buffer is generally a portion of memory that contains data that has not yet been fully committed to its intended device. In the case of buffered I/O, generally there is a fast device and a slow device. The devices themselves need not have disparate speeds, but perhaps the interfaces between them differ or perhaps it is more time-consuming to either produce or consume the data than the other part is.
The idea is that you temporarily store the generated data in a buffer so that it is not lost when the slower device isn't ready to handle it. Once the device is ready, the another buffer may take the current buffer's place and the consuming device will process the data in the first buffer.
In this manner, the slower device receives the data at a moderated pace rather than the fire-hose that the original data source can be.